Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unit test for database #69

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from
Draft

Add unit test for database #69

wants to merge 15 commits into from

Conversation

Bryant-Tang
Copy link
Collaborator

  1. The unit test for User was already merged into main. But might need @Dilamissu to check out if there are some missing test case for field like "is_staff" or "is_superuser".
  2. Add unit test for UserTag, Image, Workspace, WorkspaceTag, MissionState, Activity, ActivityNotification, Event, Mission.
  3. Add UNIT_TEST_ROOT in settings, in order to store all file data generated during running test.
    !!!Notice!!! :
    (1) All files and folders generating during running test should be store in UNIT_TEST_ROOT, for example, using @override_settings(MEDIA_ROOT=settings.UNIT_TEST_ROOT) before class ImageModelTest(TestCase):.
    (2) All files and folders in UNIT_TEST_ROOT should be deleted after running test, and this action should be done by manually writing codes in tearDownClass function, or other ways that can be automatically execute.

@Bryant-Tang Bryant-Tang added enhancement New feature or request back-end 後端相關 Issue labels Dec 8, 2023
@Bryant-Tang Bryant-Tang self-assigned this Dec 8, 2023
@Bryant-Tang Bryant-Tang linked an issue Dec 8, 2023 that may be closed by this pull request
@Bryant-Tang Bryant-Tang added the mission to do mission label Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
back-end 後端相關 Issue enhancement New feature or request mission to do mission
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Database unit test implement
1 participant