def test_enqueue_and_dequeue(self): self.data = "hello moto" assert SimpleMQ.enqueue(self.data) is True assert self.r.exists(SimpleMQ.name()) assert SimpleMQ.dequeue() == self.data
def test_raise_when_enqueue_not_valid_data(self): self.set = {'a', 'b', 'c'} with self.assertRaises(TypeError): SimpleMQ.enqueue(self.set)
def test_name(self): assert SimpleMQ.name() != ""