def setUp(self): self.client = Client() self.token = Token.objects.get(user=factories.UserFactory()) self.procedure_url = '/api/procedures' self.data = {'title': 'Example Title', 'author': 'An Author'} self.user = factories.UserFactory() grant_permissions()
def setUp(self): self.client = Client(enforce_csrf_checks=False) self.user = factories.UserFactory() self.element = factories.ElementFactory() self.token = Token.objects.get(user=self.user) self.conditional_url = '/api/conditionals' grant_permissions()
def setUp(self): self.client = Client() self.token = Token.objects.get(user=factories.UserFactory()) factories.ConceptFactory() factories.ConceptFactory(name='NOT A NAME') factories.ConceptFactory(name='SXS SITEZ') self.concept_url = '/api/concepts?search={0}' self.user = factories.UserFactory() grant_permissions()
def setUp(self): self.client = Client() self.token = Token.objects.get(user=factories.UserFactory()) self.procedure_url = '/api/procedures' self.data = { 'title': 'Example Title', 'author': 'An Author' } self.user = factories.UserFactory() grant_permissions()
def setUp(self): self.client = Client() self.token = Token.objects.get(user=factories.UserFactory()) self.url = '/api/users/update_details' self.user = factories.UserFactory() self.new_email = '*****@*****.**' self.new_password = '******' self.current_password = '******' self.user.set_password(self.current_password) self.user.save() self.reset_password_url = '/api/passwords/reset_password' self.reset_password_complete_url = '/api/passwords/reset_password_complete' grant_permissions()
def setUp(self): self.client = Client() self.user = factories.UserFactory() procedure = factories.ProcedureFactory() self.page1 = factories.PageFactory(display_index=0, procedure=procedure) self.page2 = factories.PageFactory(display_index=1, procedure=procedure) self.page3 = factories.PageFactory(display_index=2, procedure=procedure) self.token = Token.objects.get(user=self.user) self.PARTIAL_BULK_URL = '/api/pages/partial_bulk_update' grant_permissions()
def setUp(self): self.client = Client() self.token = Token.objects.get(user=factories.UserFactory()) self.concept_url = '/api/concepts' self.data = { 'name': 'SX SITE SWELLING', 'display_name': 'Swelling at surgical site', 'description': 'Swelling observed at surgical site post procedure', 'data_type': 'string', 'mime_type': 'text/plain', 'constraint': 'yes;no' } self.user = factories.UserFactory() grant_permissions()
def setUp(self): self.client = Client() self.token = Token.objects.get(user=factories.UserFactory()) factories.ConceptFactory() factories.ConceptFactory( name='NOT A NAME' ) factories.ConceptFactory( name='SXS SITEZ' ) self.concept_url = '/api/concepts?search={0}' self.user = factories.UserFactory() grant_permissions()
def setUp(self): self.client = Client() self.user = factories.UserFactory() self.token = Token.objects.get(user=self.user) grant_permissions()
def setUp(self): self.client = Client() self.user = factories.UserFactory() self.token = Token.objects.get(user=self.user) self.import_csv_url = '/api/concepts/import_csv' grant_permissions()