def test_get_multiple_config_var_error(self): config_signal.connect( set_simple_config_view_multiple_vars, dispatch_uid='set_simple_config_view_multiple_vars_for_testing') with self.assertRaisesMessage( ConfigError, 'Too many values for config variable multiple_config_var found.'): config.setup_cache() config_signal.disconnect( set_simple_config_view_multiple_vars, dispatch_uid='set_simple_config_view_multiple_vars_for_testing')
def test_get_multiple_config_var_error(self): config_signal.connect( set_simple_config_view_multiple_vars, dispatch_uid='set_simple_config_view_multiple_vars_for_testing') with self.assertRaisesMessage( ConfigError, 'Too many values for config variable multiple_config_var found.' ): config.setup_cache() config_signal.disconnect( set_simple_config_view_multiple_vars, dispatch_uid='set_simple_config_view_multiple_vars_for_testing')
def test_database_queries(self): """ Test that no database queries are send, after the cache was created. """ config.setup_cache() self.assertNumQueries(0, self.get_config_var, key='string_var')