def test_enqueue_many_works_ok(self): rb = Queue(self.shell) rb.enqueue([1, 2]) self.shell.props.queue_source.add_entry.assert_has_calls([ call(1, -1), call(2, -1)])
def test_enqueue_rb_entry_ok(self): rb = Queue(self.shell) rb.enqueue(Stub(id=1)) self.shell.props.queue_source.add_entry.assert_has_calls([ call(1, -1)])
def test_enqueue_one_works_ok(self): rb = Queue(self.shell) rb.enqueue(1) self.shell.props.queue_source.add_entry.assert_has_calls([ call(1, -1)])