Commit c018132
committed
test: Improve structure of like action tests
Refactor the `TestUserPromoLikeActions` test case to be more concise and readable.
- Introduce helper methods (`_create_user_and_get_token`, `_create_promo`, `_auth`, `_get_user_promo`, `_get_business_promo`, `_like`, `_unlike`) to reduce code duplication and improve clarity.
- Consolidate multiple, granular tests into fewer, more comprehensive tests (`test_initial_promo_state`, `test_like_action`, `test_like_idempotency`, etc.).
- Remove the dependency on a strict, numbered execution order, making the test suite more robust and easier to maintain.
- Add a `tearDown` method to clean up credentials after each test.1 parent 95d5f57 commit c018132
1 file changed
+135
-361
lines changed
0 commit comments