forked from p34709852/monkey
UT: Parametrize test_save_simulation()
This commit is contained in:
parent
4a91777019
commit
9990cdc6a8
|
@ -11,15 +11,12 @@ def simulation_repository():
|
||||||
return FileSimulationRepository(SingleFileRepository())
|
return FileSimulationRepository(SingleFileRepository())
|
||||||
|
|
||||||
|
|
||||||
def test_save_simulation(simulation_repository):
|
@pytest.mark.parametrize("mode", list(IslandModeEnum))
|
||||||
simulation = Simulation(IslandModeEnum.RANSOMWARE)
|
def test_save_simulation(simulation_repository, mode):
|
||||||
|
simulation = Simulation(mode)
|
||||||
old_simulation = simulation_repository.get_simulation()
|
|
||||||
simulation_repository.save_simulation(simulation)
|
simulation_repository.save_simulation(simulation)
|
||||||
new_simulation = simulation_repository.get_simulation()
|
|
||||||
|
|
||||||
assert old_simulation != simulation
|
assert simulation_repository.get_simulation() == simulation
|
||||||
assert new_simulation == simulation
|
|
||||||
|
|
||||||
|
|
||||||
def test_get_default_simulation(simulation_repository):
|
def test_get_default_simulation(simulation_repository):
|
||||||
|
|
Loading…
Reference in New Issue