Exemple #1
0
    def test_points_chaining(self):
        sim = Simulation(users_count=2, max_books_per_user=2, exchange_points_count=3)
        sim.exchange_point_capacity = 5
        sim.generate_items()
        test_point = sim.get_last_exchange_point()

        for _ in range(0,15):
            test_point.put_book(simulation_item_factory.create_simulation_book())

        for point in sim.all_exchange_points:
            self.assertTrue(len(point.stored_books)>0)
Exemple #2
0
    def test_points_chaining(self):
        sim = Simulation(users_count=2,
                         max_books_per_user=2,
                         exchange_points_count=3)
        sim.exchange_point_capacity = 5
        sim.generate_items()
        test_point = sim.get_last_exchange_point()

        for _ in range(0, 15):
            test_point.put_book(
                simulation_item_factory.create_simulation_book())

        for point in sim.all_exchange_points:
            self.assertTrue(len(point.stored_books) > 0)