Exemplo n.º 1
0
    def test_config_object_and_its_properties(self):
        conf = Configuration()
        tools.assert_equals({}, conf.configuration)
        tools.assert_equals({}, conf.data)

        conf = Configuration(configuration={
            'repodir': '/var/repos',
            'updatehooks': {'name': [(1,1), (2,2)]},
        })
        tools.assert_equals('/var/repos', str(conf.repodir))
        tools.assert_equals([(1,1), (2,2)], conf.get_updatehooks('name'))
Exemplo n.º 2
0
 def test_config_set_current_version(self):
     conf = Configuration()
     conf.set_previous_version('repo', '10')
     tools.assert_equals('10', conf.get_previous_version('repo'))