Ejemplo n.º 1
0
# Licensed under the Apache License, Version 2.0 (the "License");
# pyou may not use this file except in compliance with the License.
# You may obtain a copy of the License at

#    http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import unittest
import taxonomy_misc

tax = taxonomy_misc.TaxonomyMisc()


class TestTaxonomyMisc(unittest.TestCase):
    def test_taxonomy_numeric_types(self):
        self.assertEqual(len(tax.numeric_types()), 13)

    def test_taxonomy_ref_parts(self):
        self.assertEqual(len(tax.ref_parts()), 6)

    def test_taxonomy_generic_roles(self):
        self.assertEqual(len(tax.generic_roles()), 5)

    def test_validate_numeric_types(self):
        self.assertTrue(tax.validate_numeric_type("insolationItemType"))
        self.assertTrue(tax.validate_numeric_type("speedItemType"))
Ejemplo n.º 2
0
 def __init__(self):
     self.semantic = taxonomy_semantic.TaxonomySemantic()
     self.types = taxonomy_types.TaxonomyTypes()
     self.units = taxonomy_units.TaxonomyUnits()
     self.misc = taxonomy_misc.TaxonomyMisc()
Ejemplo n.º 3
0
 def __init__(self):
     """Taxonomy constructor."""
     self.semantic = taxonomy_semantic.TaxonomySemantic()
     self.types = taxonomy_types.TaxonomyTypes()
     self.units = taxonomy_units.TaxonomyUnits()
     self.misc = taxonomy_misc.TaxonomyMisc()