Exemple #1
0
    def test_all_method_instance_class(self):
        """Tests that the class attribute is always being returned"""
        storage = FileStorage()
        storage.__objects = {'fake': 'entry'}
        self.assertIsNot(storage.__objects, storage.all())

        self.assertDictEqual(storage.all(), {})
Exemple #2
0
 def test_all_empty(self):
     """Testing empty ret value
     """
     b = FileStorage()
     b.reset_obj()
     b.__objects = {}
     ret = b.all()
     self.assertFalse(b.all())