def setUp(self):
<EOL>oembed.autodiscover()<EOL>oembed.site._db_updated = None<EOL>self.storage = DummyMemoryStorage()<EOL>self.orig_default_storage = storage.default_storage<EOL>storage.default_storage = self.storage<EOL>self.media_root, self.media_url = settings.MEDIA_ROOT, settings.MEDIA_URL<EOL>settings.MEDIA_ROOT = MEDIA_ROOT<EOL>settings.MEDIA_URL = MEDIA_URL<EOL>self.template_dirs = settings.TEMPLATE_DIRS<EOL>cur_dir = os.path.dirname(__file__)<EOL>settings.TEMPLATE_DIRS = [os.path.join(os.path.dirname(cur_dir), '<STR_LIT>')]<EOL>self.orig_file_storage = settings.DEFAULT_FILE_STORAGE<EOL>settings.DEFAULT_FILE_STORAGE = DEFAULT_FILE_STORAGE<EOL>test_image = Image.new('<STR_LIT>', (<NUM_LIT>, <NUM_LIT>), (<NUM_LIT:255>, <NUM_LIT:255>, <NUM_LIT:255>, <NUM_LIT:255>))<EOL>self.test_img_buffer = StringIO()<EOL>test_image.save(self.test_img_buffer, '<STR_LIT>')<EOL>self.test_img_file = ContentFile(self.test_img_buffer.getvalue())<EOL>self.test_img_location = '<STR_LIT>'<EOL>storage.default_storage.save(self.test_img_location, self.test_img_file)<EOL>
Set up test environment