Example #1
0
 def test_practitioner_get(self):
     url = self.api_url_base + str(self.patient.id) + '?'
     response = {
         u'request': {
             u'patient_id': 1
         },
         u'response': {
             u'active': True,
             u'first_name': u'Chocolate',
             u'last_name': u'Chip',
             u'address_one': u'123 Cookie Lane',
             u'address_two': None,
             u'city': u'Cookieville',
             u'state': u'TN',
             u'zip_code': u'37201',
             u'email': u'[email protected]',
             u'choice_one': None,
             u'choice_two': None,
             u'choice_three': None,
             u'practice': 1,
             u'practitioner': 2,
         }
     }
     status_code, request = make_get_request(self.user, url)
     assert status_code == 200
     assert response == json.loads(request)
Example #2
0
 def test_practitioner_get(self):
     os.environ['DATABASE_URL'] = 'sqlite:////tmp/test.db'
     from cagenix import db
     self.user.activated = True
     db.session.add(self.user)
     db.session.commit()
     url = self.api_url_base + str(self.user.id) + '?'
     response = {
         u'request': {
             u'practitioner_id': 2
         },
         u'response': {
             u'city': None,
             u'first_name': u'Chocolate',
             u'last_name': u'Chip',
             u'practice': None,
             u'secondary_color': None,
             u'address_two': None,
             u'primary_color': None,
             u'state': None,
             u'address_one': None,
             u'active': True,
             u'activation_code': u'DPJE3XFBVM271HC',
             u'email': u'*****@*****.**',
             u'zip_code': None
         }
     }
     status_code, request = make_get_request(self.user, url)
     assert status_code == 200
     assert response == json.loads(request)