Skip to content

Commit

Permalink
new test
Browse files Browse the repository at this point in the history
  • Loading branch information
himanshu1196 committed Dec 13, 2023
1 parent 8b621f2 commit c0c697f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions rrapp/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,19 @@ def test_shortlist_view(self):
response = client.get(reverse("rrapp:shortlist"))
self.assertIn(response.status_code, [200, 302])

def test_shortlist_view_non_empty(self):
client = Client()
user = User.objects.create_user(
username="testuser", password="testpass", email="testuser@example.edu"
)
rentee = Rentee.objects.create(user=user)
listing = Listing.objects.create(user=user, title="Test", description="Test")
savedListing = SavedListing.objects.create(
rentee_id=rentee, saved_listings=listing
)
response = client.get(reverse("rrapp:shortlist"))
self.assertIn(response.status_code, [200, 302])


class ListingUpdateViewTest(TestCase):
def test_listing_update_view_get(self):
Expand Down

0 comments on commit c0c697f

Please sign in to comment.