Browse Source
Merge pull request #1659 from doccano/enhancement/removeUnusedCode
Remove unused code and data
pull/1660/head
Hiroki Nakayama
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
0 additions and
13 deletions
-
BIN
backend/api/tests/api/data/images/1500x500.jpeg
-
backend/api/tests/api/utils.py
Before
|
After
|
|
|
Width: 1500
|
Height: 500
|
Size: 83 KiB
|
|
|
|
@ -142,19 +142,6 @@ def prepare_project(task: str = 'Any', collaborative_annotation=False, **kwargs) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
class TestUtilsMixin: |
|
|
|
def _patch_project(self, project, attribute, value): |
|
|
|
old_value = getattr(project, attribute, None) |
|
|
|
setattr(project, attribute, value) |
|
|
|
project.save() |
|
|
|
|
|
|
|
def cleanup_project(): |
|
|
|
setattr(project, attribute, old_value) |
|
|
|
project.save() |
|
|
|
|
|
|
|
self.addCleanup(cleanup_project) |
|
|
|
|
|
|
|
|
|
|
|
class CRUDMixin(APITestCase): |
|
|
|
url = '' |
|
|
|
data = {} |
|
|
|