-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix tests #4206
Fix tests #4206
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing these! I ran them and I think there is still some test data interference.
Here's what I get when I run all the tests:
$ python src/manage.py test
FAIL: test_list_sets (src.api.tests.test_oai.TestOAIViews)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/joemull/git/janeway/venv/lib/python3.10/site-packages/django/test/utils.py", line 387, in inner
return func(*args, **kwargs)
File "/home/joemull/git/janeway/venv/lib/python3.10/site-packages/freezegun/api.py", line 789, in wrapper
result = func(*args, **kwargs)
File "/home/joemull/git/janeway/src/api/tests/test_oai.py", line 216, in test_list_sets
self.assertEqual(result.split(), expected.split())
AssertionError: Lists differ: ['<?x[874 chars]tion:3</setSpec>', '<setName>Article</setName>[36 chars]MH>'] != ['<?x[874 chars]tion:1</setSpec>', '<setName>Article</setName>[36 chars]MH>']
First differing element 47:
'<setSpec>TST:section:3</setSpec>'
'<setSpec>TST:section:1</setSpec>'
But if I just run this test, it passes:
$ python src/manage.py test api.tests.test_oai.TestOAIViews.test_list_sets
Creating test database for alias 'default'...
System check identified no issues (17 silenced).
.
----------------------------------------------------------------------
Ran 1 test in 2.014s
OK
Dear Mr Jenkins: test this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super -- all tests are now passing locally for me using the standard test runner 💯
Fixes various borked tests.