Skip to content

Commit

Permalink
patch failing tests: mocking a questionnaire response needs to land i…
Browse files Browse the repository at this point in the history
…n the research_data table.
  • Loading branch information
pbugni committed Jun 13, 2024
1 parent 1d6cd4c commit 3c97fdf
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/test_assessment_status.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Module to test assessment_status"""

import copy
from datetime import datetime
from pytz import timezone, utc
from random import choice
Expand All @@ -13,11 +12,8 @@

from portal.date_tools import FHIR_datetime, utcnow_sans_micro
from portal.extensions import db
from portal.models.audit import Audit
from portal.models.clinical_constants import CC
from portal.models.encounter import Encounter
from portal.models.identifier import Identifier
from portal.models.intervention import INTERVENTION
from portal.models.organization import Organization
from portal.models.overall_status import OverallStatus
from portal.models.qb_status import QB_Status
Expand All @@ -34,6 +30,10 @@
qnr_document_id,
)
from portal.models.recur import Recur
from portal.models.research_data import (
add_questionnaire_response,
invalidate_qnr_research_data,
)
from portal.models.research_protocol import ResearchProtocol
from portal.models.role import ROLE
from portal.models.user import User
Expand Down Expand Up @@ -95,6 +95,9 @@ def mock_qr(
db.session.add(qr)
db.session.commit()
invalidate_users_QBT(user_id=user_id, research_study_id='all')
qr = db.session.merge(qr)
invalidate_qnr_research_data(qr)
add_questionnaire_response(questionnaire_response=qr, research_study_id=0)


localized_instruments = {'eproms_add', 'epic26', 'comorb'}
Expand Down

0 comments on commit 3c97fdf

Please sign in to comment.