Debian Codegraph @

os_service_types/tests/test_builtin.py

raw
1 # Licensed under the Apache License, Version 2.0 (the "License"); you may
2 # not use this file except in compliance with the License. You may obtain
3 # a copy of the License at
4 #
5 # http://www.apache.org/licenses/LICENSE-2.0
6 #
7 # Unless required by applicable law or agreed to in writing, software
8 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 # License for the specific language governing permissions and limitations
11 # under the License.
12
13 """
14 test_builtin
15 ------------
16
17 Tests for `ServiceTypes` class builtin data.
18
19 oslotest sets up a TempHomeDir for us, so there should be no ~/.cache files
20 available in these tests.
21 """
22
23 from testscenarios import load_tests_apply_scenarios as load_tests # noqa
24
25 import os_service_types
26 from os_service_types.tests import base
27
28
29 class TestBuiltin(base._BaseServiceDataTest):
30 def setUp(self):
31 super().setUp()
32 # Make an object with no network access
33 self.service_types = os_service_types.ServiceTypes()
34
35 def test_builtin_version(self):
36 self.assertEqual(self.builtin_version, self.service_types.version)