def test_simulation_state(self): book_circle = BookCircle() book_circle.create_simulation(users_count=2, max_books_per_user=3, exchange_points_count=5) self.assertEqual(type(book_circle.simulation.state), type(SimulationState.ReadyToRunState())) book_circle.run_simulation() self.assertEqual(type(book_circle.simulation.state), type(SimulationState.ExecutedSimulationState()))
from BookCircleFacade import BookCircle book_circle = BookCircle() book_circle.create_simulation(users_count=2, max_books_per_user=3, exchange_points_count=5) book_circle.run_simulation() book_circle.save_simulation_data(commit=False)