-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
refactor: Tests cleanup and better test isolation #452
refactor: Tests cleanup and better test isolation #452
Conversation
tests/test_component_as_view.py
Outdated
@@ -150,14 +162,6 @@ def test_replace_slot_in_view(self): | |||
response.content, | |||
) | |||
|
|||
def test_replace_slot_in_view_with_insecure_content(self): |
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.
Shouldn't we still test this?
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.
Ah, forgot to attach a comment here, but this is a duplicate, it has the same function body as the function below (test_replace_slot_in_view_with_insecure_content
)
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.
But thanks for pointing out, as I'm looking at it now, I guess the first functions probavbly should have used /test_context_insecure/
endpoint instead?
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.
Yes, you're right. I think I made a typo when I wrote that 😅
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.
Haha, happens :D Reverted the deletion and fixed the test in 8cc12ef 🎉
dedent()
in test assertions that usedassertHTMLEqual
setUpClass
method), and the component registry is cleared between tests.autodiscover
function to accept an optional mapping function for the import paths. This was needed because in tests, the components dir is not at the top-level, but undertests/
.Closes #436