def test_cannot_redefine_namespace(self):
    settings.test = 'Test settings'
    with self.assertRaisesRegexp(ValueError, '^Namespaces cannot be redefined$'):
        settings.test = 'Second assignment'
def test_cannot_redefine_namespace(self):
    settings.test = 'Test settings'
    with self.assertRaisesRegexp(ValueError, '^Namespaces cannot be redefined$'):
        settings.test = 'Second assignment'