示例#1
0
 def test_size(self):
     assert virtual.AbstractChannel()._size('queue') == 0
示例#2
0
 def test_delete(self):
     with pytest.raises(NotImplementedError):
         virtual.AbstractChannel()._delete('queue')
示例#3
0
 def test_new_queue(self):
     self.assertIsNone(virtual.AbstractChannel()._new_queue("queue"))
示例#4
0
 def test_put(self):
     with pytest.raises(NotImplementedError):
         virtual.AbstractChannel()._put('queue', 'm')
示例#5
0
 def test_size(self):
     self.assertEqual(virtual.AbstractChannel()._size("queue"), 0)
示例#6
0
 def test_delete(self):
     self.assertRaises(NotImplementedError,
                       virtual.AbstractChannel()._delete, "queue")
示例#7
0
 def test_poll(self):
     cycle = Mock(name='cycle')
     assert virtual.AbstractChannel()._poll(cycle, Mock())
     cycle.get.assert_called()
示例#8
0
 def test_put(self):
     self.assertRaises(NotImplementedError,
                       virtual.AbstractChannel()._put, "queue", "m")
示例#9
0
 def test_has_queue(self):
     assert virtual.AbstractChannel()._has_queue('queue')
示例#10
0
 def test_new_queue(self):
     assert virtual.AbstractChannel()._new_queue('queue') is None
示例#11
0
 def test_has_queue(self):
     self.assertTrue(virtual.AbstractChannel()._has_queue('queue'))
示例#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")