forked from botswana-harvard/edc-identifier
-
Notifications
You must be signed in to change notification settings - Fork 1
/
runtests.py
47 lines (40 loc) · 1.33 KB
/
runtests.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env python
import logging
from pathlib import Path
from edc_test_utils import DefaultTestSettings, func_main
app_name = "edc_identifier"
base_dir = Path(__file__).absolute().parent
project_settings = DefaultTestSettings(
calling_file=__file__,
APP_NAME=app_name,
BASE_DIR=base_dir,
SUBJECT_VISIT_MODEL="edc_visit_tracking.subjectvisit",
INSTALLED_APPS=[
"django.contrib.admin",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
"django.contrib.sites",
"django_crypto_fields.apps.AppConfig",
"edc_action_item.apps.AppConfig",
"edc_device.apps.AppConfig",
"edc_randomization.apps.AppConfig",
"edc_sites.apps.AppConfig",
"edc_notification.apps.AppConfig",
"edc_protocol.apps.AppConfig",
"edc_appointment.apps.AppConfig",
"edc_metadata.apps.AppConfig",
"edc_registration.apps.AppConfig",
"edc_visit_schedule.apps.AppConfig",
"edc_visit_tracking.apps.AppConfig",
"edc_identifier.apps.AppConfig",
],
add_dashboard_middleware=True,
).settings
def main():
func_main(project_settings, f"{app_name}.tests")
if __name__ == "__main__":
logging.basicConfig()
main()