def test_network_v4_comp_unit_update(self): kind = Kind() res = kind.network_v4_comp_unit({ 'action': 'Alterar', 'data': {'id_object': 1} }) self.assertEqual(res, False) self.assertEqual(res, False)
def test_network_v4_comp_unit_non_existent(self): napi_mock = patch( 'globomap_driver_napi.driver.NetworkAPI.get_ipv4_by_ip_equipment_id').start() napi_mock.return_value = [] data = self._queue_message('tests/json/messages/queue/ipv4_eqpt.json') kind = Kind() res = kind.network_v4_comp_unit(data[0]) self.assertEqual(res, False)
def test_network_v4_comp_unit_update(self): kind = Kind() res = kind.network_v4_comp_unit({ 'action': 'Alterar', 'data': { 'id_object': 1 } }) self.assertEqual(res, False) self.assertEqual(res, False)
def test_network_v4_comp_unit_non_existent(self): napi_mock = patch( 'globomap_driver_napi.driver.NetworkAPI.get_ipv4_by_ip_equipment_id' ).start() napi_mock.return_value = [] data = self._queue_message('tests/json/messages/queue/ipv4_eqpt.json') kind = Kind() res = kind.network_v4_comp_unit(data[0]) self.assertEqual(res, False)
def test_ipv4_eqpt(self): self._mock_ipv4() data = self._queue_message('tests/json/messages/queue/ipv4_eqpt.json') data_ret = self._update_message( 'tests/json/messages/updates/networkv4_comp_unit.json') for i in range(2): kind = Kind() res = kind.network_v4_comp_unit(data[i]) self.assertDictEqual(res, data_ret[i])
def test_ipv4_eqpt(self): self._mock_ipv4() data = self._queue_message( 'tests/json/messages/queue/ipv4_eqpt.json') data_ret = self._update_message( 'tests/json/messages/updates/networkv4_comp_unit.json') for i in range(2): kind = Kind() res = kind.network_v4_comp_unit(data[i]) self.assertDictEqual(res, data_ret[i])