def test_enqueue(self, elements_to_add: List[object],
                     expected_result: Dict[str, object]):
        queue = SimpleQueueWithTwoStacks()
        for element in elements_to_add:
            queue.enqueue(element)

        assert vars(queue) == expected_result
 def test_dequeue(
     self,
     stack_for_adding_elements: List[object],
     stack_for_removing_elements: List[object],
     expected_result: bool,
 ):
     queue = SimpleQueueWithTwoStacks(
         stack_for_adding_elements=stack_for_adding_elements,
         stack_for_removing_elements=stack_for_removing_elements,
     )
     assert queue.dequeue() == expected_result
 def test___len__(
     self,
     stack_for_adding_elements: List[object],
     stack_for_removing_elements: List[object],
     expected_result: int,
 ):
     queue = SimpleQueueWithTwoStacks(
         stack_for_adding_elements=stack_for_adding_elements,
         stack_for_removing_elements=stack_for_removing_elements,
     )
     assert len(queue) == expected_result
 def test_dequeue_negative_scenario_with_no_elements_in_queue(self):
     queue = SimpleQueueWithTwoStacks()
     with pytest.raises(ValueError):
         queue.dequeue()
 def _add_element_to_queue(queue: SimpleQueueWithTwoStacks,
                           elements: List[object]):
     for element in elements:
         queue.enqueue(element)
    def test_first(self, elements_to_add: List[object],
                   expected_result: object):
        queue = SimpleQueueWithTwoStacks()
        self._add_element_to_queue(queue=queue, elements=elements_to_add)

        assert queue.first() == expected_result