Skip to content

Commit

Permalink
Try to fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
felixoi authored and mergify[bot] committed Jan 4, 2024
1 parent 6844d03 commit 047fe7b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions spongeauth/sso/tests/test_make_payload.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ def setup_method(self):

def test_builds_payload(self):
user = accounts.tests.factories.UserFactory.build()
user._state.adding = False
user._state.db = 'default'
user.id = 123

payload = utils.make_payload(user, "nonce-nce")
assert payload == {
Expand All @@ -41,6 +44,9 @@ def test_builds_payload(self):

def test_builds_payload_not_activated(self):
user = accounts.tests.factories.UserFactory.build(email_verified=False)
user._state.adding = False
user._state.db = 'default'
user.id = 123

payload = utils.make_payload(user, "nonce-nce")
assert payload == {
Expand All @@ -62,6 +68,9 @@ def test_builds_payload_not_activated(self):

def test_sends_groups(self):
user = accounts.tests.factories.UserFactory.create()
user.id = 123
user._state.adding = False
user._state.db = 'default'
int_group_in = accounts.tests.factories.GroupFactory.create(internal_only=True)
int_group_not_in = accounts.tests.factories.GroupFactory.create(internal_only=True)
group1_in = accounts.tests.factories.GroupFactory.create(internal_only=False)
Expand Down

0 comments on commit 047fe7b

Please sign in to comment.