def test_pool_comp_unit_non_existent(self):
        napi_mock = patch(
            'globomap_driver_napi.driver.NetworkAPI.get_pool_by_member_id').start()
        napi_mock.return_value = []
        data = self._queue_message(
            'tests/json/messages/queue/server_pool_member.json')

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

        self.assertEqual(res, False)
Exemple #2
0
    def test_pool_comp_unit_non_existent(self):
        napi_mock = patch(
            'globomap_driver_napi.driver.NetworkAPI.get_pool_by_member_id'
        ).start()
        napi_mock.return_value = []
        data = self._queue_message(
            'tests/json/messages/queue/server_pool_member.json')

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

        self.assertEqual(res, False)
Exemple #3
0
    def test_pool_comp_unit(self):
        self._mock_pool_member_id()

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

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

            res = kind.pool_comp_unit(data[i])
            self.assertDictEqual(res, data_ret[i])
    def test_pool_comp_unit(self):
        self._mock_pool_member_id()

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

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

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