openedx / openedx/openedx-platform
Test: Tests break when pycountries updates its list of countries
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.2k
- Forks
- 4.4k
- Avg merge
- 6d 18h
- Merged PRs (30d)
- 42
Description
Everytime pycountries updates the list of countries, edx-platform tests fail because we have a copy of the list from that library as a set of test constants: https://github.com/openedx/edx-platform/blob/master/openedx/core/djangoapps/user_api/tests/test_constants.py
This is super brittle and it's unclear what value it's providing. Do we need these tests? What are they doing? Can we test what we care about in a less brittle way?
Investigate the tests that use the SORTED_COUNTRIES constant and where it's used and see if we can get rid of it.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with openedx/core/djangoapps/user_api/tests/test_constants.py and search the repository for uses of SORTED_COUNTRIES. Read the tests that depend on this constant to determine what behavior they actually verify. Done means removing or replacing the brittle copied country list while preserving the behavior those tests need and preventing failures when pycountries updates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100