class PhotologueBaseTest(TestCase): def setUp(self): self.s = PhotoSize(name='testPhotoSize', width=100, height=100) self.s.save() self.pl = _create_new_photo(name='Landscape', slug='landscape') def tearDown(self): self.pl.delete() self.s.delete()
class PhotologueBaseTest(TestCase): def setUp(self): self.s = PhotoSize(name='testPhotoSize', width=100, height=100) self.s.save() self.pl = _create_new_photo(name='Landscape', slug='landscape') def tearDown(self): self.pl.delete() self.s.delete()
class PhotologueBaseTest(TestCase): def setUp(self): self.s = PhotoSize(name='test', width=100, height=100) self.s.save() self.pl = _create_new_photo(name='Landscape', slug='landscape') def tearDown(self): path = self.pl.image.path self.pl.delete() os.remove(path) self.failIf(os.path.isfile(path)) self.s.delete()
class PLTest(TestCase): """ Base TestCase class """ def setUp(self): self.s = PhotoSize(name='test', width=100, height=100) self.s.save() self.pl = TestPhoto(name='landscape') self.pl.image.save(os.path.basename(LANDSCAPE_IMAGE_PATH), ContentFile(open(LANDSCAPE_IMAGE_PATH, 'rb').read())) self.pl.save() def tearDown(self): path = self.pl.image.path self.pl.delete() self.failIf(os.path.isfile(path)) self.s.delete()
class PLTest(TestCase): """ Base TestCase class """ def setUp(self): self.s = PhotoSize(name='test', width=100, height=100) self.s.save() self.pl = TestPhoto(name='landscape') self.pl.image.save( os.path.basename(LANDSCAPE_IMAGE_PATH), ContentFile(open(LANDSCAPE_IMAGE_PATH, 'rb').read())) self.pl.save() def tearDown(self): path = self.pl.image.path self.pl.delete() self.failIf(os.path.isfile(path)) self.s.delete()