Merge pull request #409 from iphoting/patch-1

Fix logic bug in test_signup (#408)
This commit is contained in:
Pēteris Caune 2020-08-05 17:32:34 +03:00 committed by GitHub
commit 96d458fcf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,8 +20,8 @@ class SignupTestCase(TestCase):
# A profile should have been created # A profile should have been created
profile = Profile.objects.get() profile = Profile.objects.get()
self.assertEqual(profile.sms_limit, 5) self.assertEqual(profile.sms_limit, 500)
self.assertEqual(profile.call_limit, 0) self.assertEqual(profile.call_limit, 500)
# And email sent # And email sent
self.assertEqual(len(mail.outbox), 1) self.assertEqual(len(mail.outbox), 1)
@ -42,7 +42,7 @@ class SignupTestCase(TestCase):
channel = Channel.objects.get() channel = Channel.objects.get()
self.assertEqual(channel.project, project) self.assertEqual(channel.project, project)
@override_settings(USE_PAYMENTS=False) @override_settings(USE_PAYMENTS=True)
def test_it_sets_high_limits(self): def test_it_sets_high_limits(self):
form = {"identity": "alice@example.org"} form = {"identity": "alice@example.org"}
@ -50,8 +50,8 @@ class SignupTestCase(TestCase):
# A profile should have been created # A profile should have been created
profile = Profile.objects.get() profile = Profile.objects.get()
self.assertEqual(profile.sms_limit, 500) self.assertEqual(profile.sms_limit, 5)
self.assertEqual(profile.call_limit, 500) self.assertEqual(profile.call_limit, 0)
@override_settings(REGISTRATION_OPEN=False) @override_settings(REGISTRATION_OPEN=False)
def test_it_obeys_registration_open(self): def test_it_obeys_registration_open(self):