aboutsummaryrefslogtreecommitdiff
path: root/diplomacy/daide
diff options
context:
space:
mode:
Diffstat (limited to 'diplomacy/daide')
-rw-r--r--diplomacy/daide/request_managers.py12
-rw-r--r--diplomacy/daide/tests/test_daide_game.py6
2 files changed, 4 insertions, 14 deletions
diff --git a/diplomacy/daide/request_managers.py b/diplomacy/daide/request_managers.py
index 8e3e5cb..e4a5451 100644
--- a/diplomacy/daide/request_managers.py
+++ b/diplomacy/daide/request_managers.py
@@ -50,12 +50,7 @@ def on_name_request(server, request, connection_handler, game):
connection_handler.token = None
if not connection_handler.token:
- user_exists = server.users.has_username(username)
-
- sign_in_request = internal_requests.SignIn(username=username,
- password='1234',
- create_user=not user_exists)
-
+ sign_in_request = internal_requests.SignIn(username=username, password='1234')
try:
token_response = yield internal_request_managers.handle_request(server, sign_in_request, connection_handler)
connection_handler.token = token_response.data
@@ -119,10 +114,7 @@ def on_i_am_request(server, request, connection_handler, game):
connection_handler.token = None
if not connection_handler.token:
- sign_in_request = internal_requests.SignIn(username=username,
- password='1234',
- create_user=False)
-
+ sign_in_request = internal_requests.SignIn(username=username, password='1234')
try:
token_response = yield internal_request_managers.handle_request(server, sign_in_request, connection_handler)
connection_handler.token = token_response.data
diff --git a/diplomacy/daide/tests/test_daide_game.py b/diplomacy/daide/tests/test_daide_game.py
index 3e970b2..93c73b7 100644
--- a/diplomacy/daide/tests/test_daide_game.py
+++ b/diplomacy/daide/tests/test_daide_game.py
@@ -390,17 +390,15 @@ def run_game_data(nb_daide_clients, rules, csv_file):
# Creating human player
human_username = 'username'
human_password = 'password'
- human_create_user = not server.users.has_user(human_username, human_password)
# Creating bot player to play for dummy powers
bot_username = constants.PRIVATE_BOT_USERNAME
bot_password = constants.PRIVATE_BOT_PASSWORD
- bot_create_user = not server.users.has_user(bot_username, bot_password)
# Connecting
connection = yield connect(HOSTNAME, port)
- human_channel = yield connection.authenticate(human_username, human_password, human_create_user)
- bot_channel = yield connection.authenticate(bot_username, bot_password, bot_create_user)
+ human_channel = yield connection.authenticate(human_username, human_password)
+ bot_channel = yield connection.authenticate(bot_username, bot_password)
# Joining human to game
channels = {BOT_KEYWORD: bot_channel}