Beispiel #1
0
def test_clear_works():
    my_conf = CKANConfig()
    my_conf[u"test_key_1"] = u"Test value 1"
    my_conf[u"test_key_2"] = u"Test value 2"
    assert len(my_conf.keys()) == 2

    my_conf.clear()
    assert len(my_conf.keys()) == 0
Beispiel #2
0
def test_clear_works():
    # Keep a copy of the original Pylons config
    _original_pylons_config = pylons.config.copy()
    my_conf = CKANConfig()
    my_conf[u"test_key_1"] = u"Test value 1"
    my_conf[u"test_key_2"] = u"Test value 2"
    assert len(my_conf.keys()) == 2

    my_conf.clear()
    assert len(my_conf.keys()) == 0

    # Restore Pylons config
    pylons.config.update(_original_pylons_config)
Beispiel #3
0
    def test_clear_works(self):

        # Keep a copy of the original Pylons config
        _original_pylons_config = pylons.config.copy()

        my_conf = CKANConfig()

        my_conf[u'test_key_1'] = u'Test value 1'
        my_conf[u'test_key_2'] = u'Test value 2'

        eq_(len(my_conf.keys()), 2)

        my_conf.clear()

        eq_(len(my_conf.keys()), 0)

        # Restore Pylons config
        pylons.config.update(_original_pylons_config)
Beispiel #4
0
    def test_clear_works(self):

        # Keep a copy of the original Pylons config
        _original_pylons_config = pylons.config.copy()

        my_conf = CKANConfig()

        my_conf[u'test_key_1'] = u'Test value 1'
        my_conf[u'test_key_2'] = u'Test value 2'

        eq_(len(my_conf.keys()), 2)

        my_conf.clear()

        eq_(len(my_conf.keys()), 0)

        # Restore Pylons config
        pylons.config.update(_original_pylons_config)