Skip to content

Commit

Permalink
Fix Flake8 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamin-lawson committed Mar 6, 2024
1 parent 1de3e72 commit 6c78a83
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tests/unit_tests/test_lobbyconnection.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,23 +166,19 @@ async def test_database_outage_error_responds_cleanly(lobbyconnection):
lobbyconnection.send = mock.AsyncMock()

def mock_ensure_authenticated(cmd):
raise OperationalError(statement='', params=[], orig=None)

raise OperationalError(statement="", params=[], orig=None)
lobbyconnection.ensure_authenticated = mock_ensure_authenticated

await lobbyconnection.on_message_received({
"command": "hello",
"login": "test",
"password": sha256(b"test_password").hexdigest(),
"unique_id": "blah"
})

lobbyconnection.send.assert_called_once_with({
"command": "notice",
"style": "error",
"text": "Unable to connect to database. Please try again later."
})

lobbyconnection.abort.assert_called_once_with("Error connecting to database")


Expand Down

0 comments on commit 6c78a83

Please sign in to comment.