|
|
|
@ -27,8 +27,8 @@ class ModelsCase(unittest.TestCase):
@@ -27,8 +27,8 @@ class ModelsCase(unittest.TestCase):
|
|
|
|
|
u1 = User(name='Henk') |
|
|
|
|
u2 = User(name='Alfred') |
|
|
|
|
|
|
|
|
|
g1.game_players.append(GamePlayer(player=u1, role=Role.owner)) |
|
|
|
|
g1.game_players.append(GamePlayer(player=u2, role=Role.bunny)) |
|
|
|
|
g1.players.append(GamePlayer(player=u1, role=Role.owner)) |
|
|
|
|
g1.players.append(GamePlayer(player=u2, role=Role.bunny)) |
|
|
|
|
|
|
|
|
|
db.session.add(g1) |
|
|
|
|
db.session.commit() |
|
|
|
@ -44,11 +44,11 @@ class ModelsCase(unittest.TestCase):
@@ -44,11 +44,11 @@ class ModelsCase(unittest.TestCase):
|
|
|
|
|
u2 = User(name='Alfred') |
|
|
|
|
u3 = User(name='Sasha') |
|
|
|
|
|
|
|
|
|
g1.game_players.append(GamePlayer(player=u1, role=Role.owner)) |
|
|
|
|
g1.game_players.append(GamePlayer(player=u2, role=Role.bunny)) |
|
|
|
|
g1.players.append(GamePlayer(player=u1, role=Role.owner)) |
|
|
|
|
g1.players.append(GamePlayer(player=u2, role=Role.bunny)) |
|
|
|
|
|
|
|
|
|
g2.game_players.append(GamePlayer(player=u1, role=Role.hunter)) |
|
|
|
|
g2.game_players.append(GamePlayer(player=u3, role=Role.bunny)) |
|
|
|
|
g2.players.append(GamePlayer(player=u1, role=Role.hunter)) |
|
|
|
|
g2.players.append(GamePlayer(player=u3, role=Role.bunny)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
db.session.add(g1) |
|
|
|
@ -65,8 +65,8 @@ class ModelsCase(unittest.TestCase):
@@ -65,8 +65,8 @@ class ModelsCase(unittest.TestCase):
|
|
|
|
|
g2 = Game(name='AnotherGame') |
|
|
|
|
u1 = User(name='Henk') |
|
|
|
|
|
|
|
|
|
g1.game_players.append(GamePlayer(player=u1, role=Role.owner)) |
|
|
|
|
g2.game_players.append(GamePlayer(player=u1, role=Role.bunny)) |
|
|
|
|
g1.players.append(GamePlayer(player=u1, role=Role.owner)) |
|
|
|
|
g2.players.append(GamePlayer(player=u1, role=Role.bunny)) |
|
|
|
|
|
|
|
|
|
o1 = Objective(name='o1') |
|
|
|
|
o1.set_hash() |
|
|
|
@ -92,10 +92,10 @@ class ModelsCase(unittest.TestCase):
@@ -92,10 +92,10 @@ class ModelsCase(unittest.TestCase):
|
|
|
|
|
u4 = User(name='Demian') |
|
|
|
|
u5 = User(name='Karl') |
|
|
|
|
|
|
|
|
|
g1.game_players.append(GamePlayer(player=u1, role=Role.owner)) |
|
|
|
|
g1.game_players.append(GamePlayer(player=u2, role=Role.bunny)) |
|
|
|
|
g1.game_players.append(GamePlayer(player=u3, role=Role.hunter)) |
|
|
|
|
g1.game_players.append(GamePlayer(player=u4, role=Role.none)) |
|
|
|
|
g1.players.append(GamePlayer(player=u1, role=Role.owner)) |
|
|
|
|
g1.players.append(GamePlayer(player=u2, role=Role.bunny)) |
|
|
|
|
g1.players.append(GamePlayer(player=u3, role=Role.hunter)) |
|
|
|
|
g1.players.append(GamePlayer(player=u4, role=Role.none)) |
|
|
|
|
|
|
|
|
|
db.session.add(g1) |
|
|
|
|
db.session.add(u5) |
|
|
|
|