def testSetStorage(self): ''' .. todo:: should this be in storage tests? (TBD) ''' uut = MtpObject(self.default_data, self.get_default_info()) storage = self.get_default_storage() uut.set_storage(storage) self.assertEqual(uut.storage, storage)
def testAddObjectSetsStorageInChild(self): parent = MtpObject(self.default_data, self.get_default_info()) uut = MtpObject(self.default_data, self.get_default_info()) storage = self.get_default_storage() parent.set_storage(storage) parent.add_object(uut) self.assertEqual(uut.storage, storage) self.assertEqual(parent.storage, storage)
def testSetStorage(self): ''' .. todo:: should this be in storage tests? (TBD) ''' uut = MtpObject(self.default_data, self.get_default_info()) storage = self.get_default_storage() uut.set_storage(storage) self.assertEqual(uut.storage, storage)
def testAddObjectSetsStorageInChild(self): parent = MtpObject(self.default_data, self.get_default_info()) uut = MtpObject(self.default_data, self.get_default_info()) storage = self.get_default_storage() parent.set_storage(storage) parent.add_object(uut) self.assertEqual(uut.storage, storage) self.assertEqual(parent.storage, storage)
def testSetStorageIsRecursive(self): ''' .. todo:: should this be in storage tests? (TBD) ''' parent = MtpObject(self.default_data, self.get_default_info()) storage = self.get_default_storage() uut = MtpObject(self.default_data, self.get_default_info()) parent.add_object(uut) parent.set_storage(storage) self.assertEqual(uut.storage, storage) self.assertEqual(parent.storage, storage)
def testSetStorageIsRecursive(self): ''' .. todo:: should this be in storage tests? (TBD) ''' parent = MtpObject(self.default_data, self.get_default_info()) storage = self.get_default_storage() uut = MtpObject(self.default_data, self.get_default_info()) parent.add_object(uut) parent.set_storage(storage) self.assertEqual(uut.storage, storage) self.assertEqual(parent.storage, storage)