예제 #1
0
    def test_vip_non_existent(self):
        napi_mock = patch(
            'globomap_driver_napi.driver.NetworkAPI.get_vip').start()
        napi_mock.return_value = []
        data = self._queue_message(
            'tests/json/messages/queue/vip_request.json')

        kind = Kind()
        res = kind.vip(data[1])

        self.assertEqual(res, False)
예제 #2
0
    def test_vip_non_existent(self):
        napi_mock = patch(
            'globomap_driver_napi.driver.NetworkAPI.get_vip').start()
        napi_mock.return_value = []
        data = self._queue_message(
            'tests/json/messages/queue/vip_request.json')

        kind = Kind()
        res = kind.vip(data[1])

        self.assertEqual(res, False)
예제 #3
0
    def test_vip(self):
        self._mock_vip()

        data = self._queue_message(
            'tests/json/messages/queue/vip_request.json')
        data_ret = self._update_message('tests/json/messages/updates/vip.json')

        for i in range(3):
            kind = Kind()

            res = kind.vip(data[i])
            self.assertDictEqual(res, data_ret[i])
예제 #4
0
    def test_vip(self):
        self._mock_vip()

        data = self._queue_message(
            'tests/json/messages/queue/vip_request.json')
        data_ret = self._update_message('tests/json/messages/updates/vip.json')

        for i in range(3):
            kind = Kind()

            res = kind.vip(data[i])
            self.assertDictEqual(res, data_ret[i])