Skip to content

Commit

Permalink
'SRZ' is the usual Blueshirt TLA
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterJCLaw committed Jan 6, 2021
1 parent d0c031d commit 7f63e7a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion code_submitter/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ class FileBackend(BasicAuthBackend):
"""

UNKNOWN_USER_MESSAGE = "Username or password is incorrect"
BLUESHIRT_TEAM = 'SRX'
BLUESHIRT_TEAM = 'SRZ'

def __init__(self, *, path: Union[str, Path]) -> None:
with open(path) as f:
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/auth-file.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ABC: password1
SRX: bees
SRZ: bees
2 changes: 1 addition & 1 deletion tests/tests_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def test_incorrect_password(self) -> None:
self.assertEqual(e.exception.args[0], FileBackend.UNKNOWN_USER_MESSAGE)

def test_blueshirt(self) -> None:
scopes, user = self.await_(self.backend.validate('SRX', 'bees'))
scopes, user = self.await_(self.backend.validate('SRZ', 'bees'))

self.assertIsNone(user.team, "Wrong team for user")
self.assertEqual('Blueshirt', user.username, "Wrong username for user")
Expand Down

0 comments on commit 7f63e7a

Please sign in to comment.