def tearDownClass(cls): cleanup_test_resources_by_tag([ (UNIQUE_TAG, ), (UNIQUE_TAG, { 'resource_type': 'raw' }), (UNIQUE_TAG, { 'type': 'twitter_name' }), ]) cleanup_test_resources([ ([TEST_ID1, TEST_ID2], ), ([TEXT_ID], { 'type': 'text' }), ([TEST_DOCX_ID], { 'resource_type': 'raw' }), ]) cleanup_test_transformation([ ([TEST_TRANS_SCALE2_STR, TEST_TRANS_SCALE2_PNG_STR], ), ]) with ignore_exception( suppress_traceback_classes=(exceptions.BadRequest, )): api.delete_metadata_field(METADATA_FIELD_UNIQUE_EXTERNAL_ID)
def setUp(self): cloudinary.reset_config() with ignore_exception( suppress_traceback_classes=(exceptions.BadRequest, )): api.add_metadata_field({ "external_id": METADATA_FIELD_UNIQUE_EXTERNAL_ID, "label": METADATA_FIELD_UNIQUE_EXTERNAL_ID, "type": "string", })
def tearDownClass(cls): cleanup_test_resources([([API_TEST_ID, API_TEST_ID2, API_TEST_ID3, API_TEST_ID4, API_TEST_ID5],)]) cleanup_test_transformation([ ([API_TEST_TRANS, API_TEST_TRANS2, API_TEST_TRANS3, API_TEST_TRANS_SCALE100_STR],), ]) cleanup_test_resources_by_tag([ (UNIQUE_API_TAG,), (UNIQUE_API_TAG, {'resource_type': 'raw'}), ]) with ignore_exception(suppress_traceback_classes=(api.NotFound,)): api.delete_upload_mapping(MAPPING_TEST_ID)
def tearDown(self): with ignore_exception(): os.environ["CLOUDINARY_URL"] = self.url_backup cloudinary.reset_config()
def tearDownClass(cls): for external_id in METADATA_FIELDS: with ignore_exception(suppress_traceback_classes=(api.NotFound,)): api.delete_metadata_field(external_id)
def tearDown(self): with ignore_exception(): shutil.rmtree(self.root_path, True)
def tearDown(self): with ignore_exception(): os.environ["CLOUDINARY_URL"] = self.url_backup cloudinary.reset_config()