def test_returns_default_scopes_if_none_given(self): id_to_scope = scoping.get_id_to_scope_with_defaults() self.assertEqual({scoping.SINGLETON, scoping.PROTOTYPE}, set(id_to_scope.keys()))
def test_returns_default_scopes_if_none_given(self): id_to_scope = scoping.get_id_to_scope_with_defaults() self.assertEqual(set([scoping.SINGLETON, scoping.PROTOTYPE]), set(id_to_scope.keys()))
def test_adds_default_scopes_to_given_scopes(self): orig_id_to_scope = {'a-scope-id': 'a-scope'} id_to_scope = scoping.get_id_to_scope_with_defaults(orig_id_to_scope) self.assertEqual('a-scope', id_to_scope['a-scope-id']) self.assertIn(scoping.SINGLETON, id_to_scope) self.assertIn(scoping.PROTOTYPE, id_to_scope)