Fix tests#4206
Merged
Merged
Conversation
mauromsl
approved these changes
May 31, 2024
joemull
requested changes
May 31, 2024
joemull
left a comment
Member
There was a problem hiding this comment.
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
Member
Author
|
Dear Mr Jenkins: test this please |
joemull
approved these changes
Jun 4, 2024
joemull
left a comment
Member
There was a problem hiding this comment.
Super -- all tests are now passing locally for me using the standard test runner 💯
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes various borked tests.