diff --git a/pyramid/config/settings.py b/pyramid/config/settings.py index 26eb48951b..52b30db81d 100644 --- a/pyramid/config/settings.py +++ b/pyramid/config/settings.py @@ -56,6 +56,7 @@ def Settings(d=None, _environ_=os.environ, **kw): keyword args).""" if d is None: d = {} + d = dict(d) d.update(**kw) eget = _environ_.get diff --git a/pyramid/tests/test_config/test_settings.py b/pyramid/tests/test_config/test_settings.py index d6fb8de67b..202629358e 100644 --- a/pyramid/tests/test_config/test_settings.py +++ b/pyramid/tests/test_config/test_settings.py @@ -12,12 +12,12 @@ def test__set_settings_as_None(self): settings = config._set_settings(None) self.assertTrue(settings) - def test__set_settings_uses_original_dict(self): + def test__set_settings_does_not_uses_original_dict(self): config = self._makeOne() dummy = {} result = config._set_settings(dummy) - self.assertTrue(dummy is result) - self.assertEqual(dummy['pyramid.debug_all'], False) + self.assertTrue(dummy is not result) + self.assertNotIn('pyramid.debug_all', dummy) def test__set_settings_as_dictwithvalues(self): config = self._makeOne()