Esempio n. 1
0
 def test_size(self):
     assert virtual.AbstractChannel()._size('queue') == 0
Esempio n. 2
0
 def test_delete(self):
     with pytest.raises(NotImplementedError):
         virtual.AbstractChannel()._delete('queue')
Esempio n. 3
0
 def test_new_queue(self):
     self.assertIsNone(virtual.AbstractChannel()._new_queue("queue"))
Esempio n. 4
0
 def test_put(self):
     with pytest.raises(NotImplementedError):
         virtual.AbstractChannel()._put('queue', 'm')
Esempio n. 5
0
 def test_size(self):
     self.assertEqual(virtual.AbstractChannel()._size("queue"), 0)
Esempio n. 6
0
 def test_delete(self):
     self.assertRaises(NotImplementedError,
                       virtual.AbstractChannel()._delete, "queue")
Esempio n. 7
0
 def test_poll(self):
     cycle = Mock(name='cycle')
     assert virtual.AbstractChannel()._poll(cycle, Mock())
     cycle.get.assert_called()
Esempio n. 8
0
 def test_put(self):
     self.assertRaises(NotImplementedError,
                       virtual.AbstractChannel()._put, "queue", "m")
Esempio n. 9
0
 def test_has_queue(self):
     assert virtual.AbstractChannel()._has_queue('queue')
Esempio n. 10
0
 def test_new_queue(self):
     assert virtual.AbstractChannel()._new_queue('queue') is None
Esempio n. 11
0
 def test_has_queue(self):
     self.assertTrue(virtual.AbstractChannel()._has_queue('queue'))
Esempio n. 12
0
 def test_purge(self):
     with self.assertRaises(NotImplementedError):
         virtual.AbstractChannel()._purge('queue')
 def test_get(self):
     with self.assertRaises(NotImplementedError):
         virtual.AbstractChannel()._get("queue")