Beispiel #1
0
    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
Beispiel #2
0
    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
Beispiel #3
0
    def test_raise_when_enqueue_not_valid_data(self):
        self.set = {'a', 'b', 'c'}

        with self.assertRaises(TypeError):
            SimpleMQ.enqueue(self.set)
Beispiel #4
0
 def test_name(self):
     assert SimpleMQ.name() != ""
Beispiel #5
0
    def test_raise_when_enqueue_not_valid_data(self):
        self.set = {'a', 'b', 'c'}

        with self.assertRaises(TypeError):
            SimpleMQ.enqueue(self.set)
Beispiel #6
0
 def test_name(self):
     assert SimpleMQ.name() != ""