Fix api auth tests
parent
68a579338f
commit
196ac5684f
|
@ -87,7 +87,7 @@ def get_membership_by_token(token:str):
|
|||
is raised.
|
||||
"""
|
||||
membership_model = get_model("projects", "Membership")
|
||||
qs = membership_model.objects.filter(user__isnull=True, token=token)
|
||||
qs = membership_model.objects.filter(token=token)
|
||||
if len(qs) == 0:
|
||||
raise exc.NotFound("Token not matches any valid invitation.")
|
||||
return qs[0]
|
||||
|
|
|
@ -61,7 +61,8 @@ def test_respond_201_if_domain_allows_public_registration(client, register_form)
|
|||
})
|
||||
|
||||
response = client.post(reverse("auth-register"), register_form)
|
||||
assert response.status_code == 201
|
||||
|
||||
assert response.status_code == 201, response.data
|
||||
|
||||
|
||||
def test_response_200_in_registration_with_github_account(client):
|
||||
|
|
Loading…
Reference in New Issue