def test_networkv4_non_existent(self): napi_mock = patch( 'globomap_driver_napi.driver.NetworkAPI.get_network_ipv4_id').start() napi_mock.return_value = [] data = self._queue_message('tests/json/messages/queue/networkv4.json') kind = Kind() res = kind.network_v4(data[1]) self.assertEqual(res, False)
def test_networkv4_non_existent(self): napi_mock = patch( 'globomap_driver_napi.driver.NetworkAPI.get_network_ipv4_id' ).start() napi_mock.return_value = [] data = self._queue_message('tests/json/messages/queue/networkv4.json') kind = Kind() res = kind.network_v4(data[1]) self.assertEqual(res, False)
def test_networkv4(self): self._mock_networkv4() data = self._queue_message('tests/json/messages/queue/networkv4.json') data_ret = self._update_message( 'tests/json/messages/updates/networkv4.json') for i in range(3): kind = Kind() res = kind.network_v4(data[i]) self.assertDictEqual(res, data_ret[i])
def test_networkv4(self): self._mock_networkv4() data = self._queue_message( 'tests/json/messages/queue/networkv4.json') data_ret = self._update_message( 'tests/json/messages/updates/networkv4.json') for i in range(3): kind = Kind() res = kind.network_v4(data[i]) self.assertDictEqual(res, data_ret[i])