Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvw committed Mar 8, 2024
1 parent ae85c95 commit 41b0278
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion data_manager_app/consents.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from edc_protocol.research_protocol_config import ResearchProtocolConfig

consent_v1 = ConsentDefinition(
"data_manager_app.subjectconsent",
"data_manager_app.subjectconsentv1",
version="1",
start=ResearchProtocolConfig().study_open_datetime,
end=ResearchProtocolConfig().study_close_datetime,
Expand Down
5 changes: 5 additions & 0 deletions data_manager_app/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ def natural_key(self):
return (self.subject_identifier,) # noqa


class SubjectConsentV1(SubjectConsent):
class Meta:
proxy = True


class SubjectReconsent(
ConsentModelMixin,
PersonalFieldsMixin,
Expand Down
4 changes: 2 additions & 2 deletions edc_data_manager/tests/tests/test_query_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from data_manager_app.lab_profiles import lab_profile
from data_manager_app.models import (
CrfOne,
SubjectConsent,
SubjectConsentV1,
SubjectRequisition,
SubjectVisit,
)
Expand Down Expand Up @@ -62,7 +62,7 @@ def setUp(self):

self.subject_identifier = "101-40990029-4"
identity = "123456789"
subject_consent = SubjectConsent.objects.create(
subject_consent = SubjectConsentV1.objects.create(
subject_identifier=self.subject_identifier,
consent_datetime=get_utcnow() - relativedelta(days=10),
identity=identity,
Expand Down

0 comments on commit 41b0278

Please sign in to comment.