[tests/config] Small refactoring (renaming)

This commit is contained in:
Tobi-wan Kenobi 2016-12-04 08:25:11 +01:00
parent a7eff64294
commit e5201187a2

View file

@ -9,17 +9,16 @@ class TestConfig(unittest.TestCase):
self.someSimpleModules = ["foo", "bar", "baz"] self.someSimpleModules = ["foo", "bar", "baz"]
self.someAliasModules = ["foo:a", "bar:b", "baz:c"] self.someAliasModules = ["foo:a", "bar:b", "baz:c"]
def test_no_modules_by_default(self): def test_no_modules_by_default(self):
self.assertEquals(self.defaultConfig.modules(), []) self.assertEquals(self.defaultConfig.modules(), [])
def test_load_simple_modules(self): def test_simple_modules(self):
cfg = Config(["-m"] + self.someSimpleModules) cfg = Config(["-m"] + self.someSimpleModules)
self.assertEquals(cfg.modules(), [{ self.assertEquals(cfg.modules(), [{
"name": x, "module": x "name": x, "module": x
} for x in self.someSimpleModules]) } for x in self.someSimpleModules])
def test_load_alias_modules(self): def test_alias_modules(self):
cfg = Config(["-m"] + self.someAliasModules) cfg = Config(["-m"] + self.someAliasModules)
self.assertEquals(cfg.modules(), [{ self.assertEquals(cfg.modules(), [{
"module": x.split(":")[0], "module": x.split(":")[0],