Set some real tests for the ids in ORDERED_CLASSES

The order of ORDERED_CLASSES is used to set ids in the database
or to map to existing ids already in the resource classes
database in placement.
This commit is contained in:
Chris Dent 2018-09-14 14:56:25 -06:00
parent 5fc979e641
commit a6f30f696b
1 changed files with 8 additions and 2 deletions

View File

@ -19,10 +19,16 @@ test_os_resource_classes
Tests for `os_resource_classes` module.
"""
import os_resource_classes as rc
from os_resource_classes.tests import base
class TestOs_resource_classes(base.TestCase):
def test_something(self):
pass
def test_id_mapping_strings(self):
self.assertEqual('VCPU', rc.ORDERED_CLASSES[0])
self.assertEqual('DISK_GB', rc.ORDERED_CLASSES[2])
def test_id_mapping_symbols(self):
self.assertEqual(rc.VCPU, rc.ORDERED_CLASSES[0])
self.assertEqual(rc.DISK_GB, rc.ORDERED_CLASSES[2])