示例#1
0
 def test_bulk_network_create(self):
     v = notifications.Network(mock.Mock())
     samples = list(
         v.process_notification(NOTIFICATION_BULK_NETWORK_CREATE))
     self.assertEqual(4, len(samples))
     self.assertEqual("network", samples[0].name)
     self.assertEqual("network.create", samples[1].name)
     self.assertEqual("network", samples[2].name)
     self.assertEqual("network.create", samples[3].name)
 def test_network(self):
     v = notifications.Network()
     events = v.event_types
     assert events
 def test_network_exists(self):
     v = notifications.Network()
     samples = v.process_notification(NOTIFICATION_NETWORK_EXISTS)
     self.assertEqual(len(list(samples)), 1)
 def test_network_create(self):
     v = notifications.Network()
     samples = list(v.process_notification(NOTIFICATION_NETWORK_CREATE))
     self.assertEqual(len(samples), 2)
     self.assertEqual(samples[1].name, "network.create")
示例#5
0
 def test_network(self):
     v = notifications.Network(mock.Mock())
     events = v.event_types
     self.assertIsNotEmpty(events)