@@ -0,0 +1,1568 @@
+%22%22%22Objects catalog unittests.%22%22%22%0A%0Aimport unittest2 as unittest%0A%0Afrom objects.catalog import AbstractCatalog%0A%0Afrom objects.providers import Object%0Afrom objects.providers import Value%0A%0Afrom objects.errors import Error%0A%0A%0Aclass CatalogTests(unittest.TestCase):%0A%0A    %22%22%22Catalog test cases.%22%22%22%0A%0A    class Catalog(AbstractCatalog):%0A%0A        %22%22%22Test catalog.%22%22%22%0A%0A        obj = Object(object())%0A        another_obj = Object(object())%0A%0A    def test_get_used(self):%0A        %22%22%22Test retrieving used provider.%22%22%22%0A        catalog = self.Catalog(self.Catalog.obj)%0A        self.assertIsInstance(catalog.obj(), object)%0A%0A    def test_get_unused(self):%0A        %22%22%22Test retrieving unused provider.%22%22%22%0A        catalog = self.Catalog()%0A        self.assertRaises(Error, getattr, catalog, 'obj')%0A%0A    def test_all_providers(self):%0A        %22%22%22Test getting of all catalog providers.%22%22%22%0A        all_providers = self.Catalog.all_providers()%0A        all_providers_dict = dict(all_providers)%0A%0A        self.assertIsInstance(all_providers, set)%0A        self.assertTrue(len(all_providers) == 2)%0A%0A        self.assertIn('obj', all_providers_dict)%0A        self.assertIn(self.Catalog.obj, all_providers_dict.values())%0A%0A        self.assertIn('another_obj', all_providers_dict)%0A        self.assertIn(self.Catalog.another_obj, all_providers_dict.values())%0A%0A    def test_all_providers_by_type(self):%0A        %22%22%22Test getting of all catalog providers of specific type.%22%22%22%0A        self.assertTrue(len(self.Catalog.all_providers(Object)) == 2)%0A        self.assertTrue(len(self.Catalog.all_providers(Value)) == 0)%0A

Add some tests for catalog