def test_user_org_get(self): self.bless_with_basics() self.test_user = db.session.merge(self.test_user) expected = [ Reference.organization(o.id).as_fhir() for o in self.test_user.organizations] self.login() response = self.client.get('/api/user/{}/organization'.format( TEST_USER_ID)) assert response.status_code == 200 assert response.json['organizations'] == expected
def test_user_org_get(self): self.bless_with_basics() self.test_user = db.session.merge(self.test_user) expected = [ Reference.organization(o.id).as_fhir() for o in self.test_user.organizations ] self.login() response = self.client.get( '/api/user/{}/organization'.format(TEST_USER_ID)) assert response.status_code == 200 assert response.json['organizations'] == expected
def test_org_w_identifier(self): o = self.prep_org_w_identifier() o_ref = Reference.organization(o.id) assert o_ref.as_fhir()['display'] == 'test org' assert (o_ref.as_fhir()['reference'] == 'api/organization/{}'.format(o.id))
def test_organization(self): org = Reference.organization(0) assert org.as_fhir()['display'] == 'none of the above'
def test_organization(self): org = Reference.organization(0) self.assertEquals(org.as_fhir()['display'], 'none of the above')
def test_org_w_identifier(self): o = self.prep_org_w_identifier() o_ref = Reference.organization(o.id) assert o_ref.as_fhir()['display'] == 'test org' assert (o_ref.as_fhir()['reference'] == 'api/organization/{}'.format( o.id))
def test_organization(self): org = Reference.organization(0) assert org.as_fhir()['display'] == 'none of the above'