billing: Fix enforcement of seat_count in tests.

This commit is contained in:
Rishi Gupta 2018-11-29 21:33:04 -08:00 committed by Rishi Gupta
parent 5a47ac96de
commit 16b7737da3
1 changed files with 2 additions and 1 deletions

View File

@ -198,9 +198,10 @@ class StripeTest(ZulipTestCase):
for user in UserProfile.objects.filter(realm=realm, is_active=True, is_bot=False) \
.exclude(email__in=[
self.example_email('hamlet'),
self.example_email('iago')])[:seat_count - 8]:
self.example_email('iago')])[6:]:
user.is_active = False
user.save(update_fields=['is_active'])
self.assertEqual(get_seat_count(get_realm('zulip')), 8)
self.seat_count = 8
self.signed_seat_count, self.salt = sign_string(str(self.seat_count))