Best way to test components? #311
Unanswered
liamlawless35
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Ok, so when i want to send a request to a view in normal django, all I do is self.client.post('url here'). With Django unicorn, the best way I could find was to import the component and create an instance of the class with something like test_class = TestUnicornView("various kwargs here", then test each method with test_class.test_method(). It works fine, but it feels super inelegant and hamfisted compared to a simple self.client.post.
Is this a good method for testing? How do you guys do it?
Beta Was this translation helpful? Give feedback.
All reactions