Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed the failing tests
  • Loading branch information
frol committed Feb 12, 2019
1 parent 98cf182 commit 90d60a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/modules/users/permissions/rules.py
Expand Up @@ -37,15 +37,15 @@ class Rule(BaseRule):
rules.
"""

def base(self): # pylint: disable=inconsistent-return-statements
def base(self):
# XXX: it handles only the first appropriate Rule base class
# TODO: PR this case to permission project
for base_class in self.__class__.__bases__:
if issubclass(base_class, Rule):
if base_class in {Rule, BaseRule}:
continue
return base_class()
assert False, "This should never happen"
return None


class AllowAllRule(Rule):
Expand Down
2 changes: 1 addition & 1 deletion tests/modules/users/resources/test_signup.py
Expand Up @@ -3,7 +3,7 @@


def test_signup_form(flask_app_client):
response = flask_app_client.get('/api/v1/users/signup_form')
response = flask_app_client.get('/api/v1/users/signup-form')
assert response.status_code == 200
assert response.content_type == 'application/json'
assert set(response.json.keys()) == {"recaptcha_server_key"}
Expand Down

0 comments on commit 90d60a2

Please sign in to comment.