def test_environment_non_existent(self): napi_mock = patch( 'globomap_driver_napi.driver.NetworkAPI.get_environment').start() napi_mock.return_value = [] data = self._queue_message( 'tests/json/messages/queue/environment.json') kind = Kind() res = kind.environment(data[1]) self.assertEqual(res, False)
def test_environment_non_existent(self): napi_mock = patch( 'globomap_driver_napi.driver.NetworkAPI.get_environment').start() napi_mock.return_value = [] data = self._queue_message( 'tests/json/messages/queue/environment.json') kind = Kind() res = kind.environment(data[1]) self.assertEqual(res, False)
def test_environment(self): self._mock_environment() data = self._queue_message( 'tests/json/messages/queue/environment.json') data_ret = self._update_message( 'tests/json/messages/updates/environment.json') for i in range(3): kind = Kind() res = kind.environment(data[i]) self.assertDictEqual(res, data_ret[i])
def test_environment(self): self._mock_environment() data = self._queue_message( 'tests/json/messages/queue/environment.json') data_ret = self._update_message( 'tests/json/messages/updates/environment.json') for i in range(3): kind = Kind() res = kind.environment(data[i]) self.assertDictEqual(res, data_ret[i])