Skip to content

Commit

Permalink
add more tests to test_post_get for testing filter function
Browse files Browse the repository at this point in the history
  • Loading branch information
weineng-hsu committed Mar 30, 2022
1 parent 67a985f commit 2b6dee9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions posts/tests/tests_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ def test_post_get(self):
self.assertEquals(login, True)
response2 = self.client.get("/posts/")
self.assertEquals(response2.status_code, 200)
response3 = self.client.get(
"/posts/", category="tech", option="rent", sort="priceasc"
)
self.assertEquals(response3.status_code, 200)
response3 = self.client.get(
"/posts/", category="tech", option="rent", sort="pricedsc"
)
self.assertEquals(response3.status_code, 200)

def test_post_create_get(self):
response = self.client.get("/posts/create/")
Expand Down

0 comments on commit 2b6dee9

Please sign in to comment.