Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
fix: fixed issue in test_site test
Browse files Browse the repository at this point in the history
  • Loading branch information
zubair-ce07 committed Oct 18, 2023
1 parent 918dd04 commit 42ae0f0
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions ecommerce/extensions/dashboard/offers/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
class OfferWizardTests(TestCase):
def test_site(self):
""" Verify the site is stored in the session. """

user = self.create_user(is_staff=True)
self.client.login(username=user.username, password=self.password)
site_configuration = SiteConfigurationFactory()
Expand All @@ -28,17 +29,12 @@ def test_site(self):
metadata = {
'name': 'Test Offer',
'description': 'Blah!',
'offer_type': 'test',
'site': site.id,
}
metadata_url = reverse('dashboard:offer-metadata')
response = self.client.post(metadata_url, metadata)

print(response.template_name)
print(response.context_data)
print(response.status_code)
for header, value in response.items():
print(f"{header}: {value}")

self.assertEqual(response.status_code, 302)
self.assertEqual(response['Location'], reverse('dashboard:offer-benefit'))

Expand Down

0 comments on commit 42ae0f0

Please sign in to comment.