Skip to content

Fix Sector fixture assumptions in deployments tests (#2284)#2781

Open
Tarekchehahde wants to merge 1 commit into
IFRCGo:developfrom
Tarekchehahde:fix/2284-sector-test-fixtures
Open

Fix Sector fixture assumptions in deployments tests (#2284)#2781
Tarekchehahde wants to merge 1 commit into
IFRCGo:developfrom
Tarekchehahde:fix/2284-sector-test-fixtures

Conversation

@Tarekchehahde

Copy link
Copy Markdown

Summary

  • Create explicit Sector and SectorTag instances in ProjectGetTest.setUp() instead of Sector.objects.get(pk=…) against migration-seeded data
  • Update test_2, create_project, and TranslationTest to reference those fixtures
  • Add iso3 on test countries for consistency with other project tests

Follows the approach discussed in #2284 and used on feature/full-squash.

Closes #2284

Test plan

  • docker-compose run --rm test pytest deployments/test_views.py::ProjectGetTest -q
  • docker-compose run --rm test pytest deployments/test_views.py::TranslationTest -q

Made with Cursor

Stop relying on migration-seeded Sector/SectorTag rows by creating explicit
test fixtures in ProjectGetTest and TranslationTest setUp.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[PROD] Unit test anomalies

1 participant