Exemple #1
0
    def test_environment_vlan_non_existent(self):
        napi_mock = patch(
            'globomap_driver_napi.driver.NetworkAPI.get_vlan').start()
        napi_mock.return_value = []
        data = self._queue_message('tests/json/messages/queue/vlan.json')

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

        self.assertEqual(res, False)
    def test_environment_vlan_non_existent(self):
        napi_mock = patch(
            'globomap_driver_napi.driver.NetworkAPI.get_vlan').start()
        napi_mock.return_value = []
        data = self._queue_message('tests/json/messages/queue/vlan.json')

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

        self.assertEqual(res, False)
Exemple #3
0
    def test_environment_vlan(self):
        self._mock_vlan()

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

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

            res = kind.environment_vlan(data[i])
            self.assertDictEqual(res, data_ret[i])
    def test_environment_vlan(self):
        self._mock_vlan()

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

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

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