def setUp(self): CRAMSApiTstCase.setUp(self) # Expire Token setback_ts = datetime.timedelta(seconds=TOKEN_EXPIRY_TIME_SECONDS) self.token.created = self.token.created - setback_ts self.token.save() self.viewset_api_dict = { 'project/': views.ProjectViewSet, 'request_history/': views_list.RequestHistoryViewSet, 'request/': views.RequestViewSet, 'approve_request/': views.ApproveRequestViewSet, 'decline_request/': views.DeclineRequestViewSet, 'provision_project/list/': views.ProvisionProjectViewSet, 'provision_project/update/': views.UpdateProvisionProjectViewSet, 'provision_request/': views.ProvisionRequestViewSet, 'user_funding_body': views_list.CurrentUserApproverRoleList, 'contact': views.ContactViewSet, } self.view_dict = { 'user_roles': views_list.CurrentUserRolesView, 'contact/[email protected]': views.ContactDetail, 'searchcontact': views.SearchContact, 'project_list': pr_api.UserProjectListView, 'project_request_list': pr_api.UserProjectRequestListView, 'approve_list': pr_api.ApproverReviewerRequestListView, 'alloc_counter': pr_api.FundingBodyAllocationsCounter, } self.view_fn_dict = { # 'contacts': lookup.contacts, }
def setUp(self): CRAMSApiTstCase.setUp(self) # override the user and token in the fixtures with test_data # self.user = User.objects.get(username="******") # self.token = Token.objects.get_or_create(user=self.user)[0] self.test_data = get_vicnode_test_data(self.user.id, self.contact)
def setUp(self): CRAMSApiTstCase.setUp(self) self.search_contact_1 = Contact.objects.create( title='Mr', given_name='John', surname='Smith', email='*****@*****.**', phone='0399020780', organisation='Monash University') self.search_contact_2 = Contact.objects.create( title='Mr', given_name='John', surname='Doe', email='*****@*****.**', phone='0399020780', organisation='Monash University') self.search_contact_3 = Contact.objects.create( title='Mr', given_name='Jane', surname='Doe', email='*****@*****.**', phone='0399020780', organisation='Monash University')
def setUp(self): CRAMSApiTstCase.setUp(self) self.debug = False
def setUp(self): CRAMSApiTstCase.setUp(self) self.test_data = get_base_nectar_project_data(self.user.id, self.contact)
def setUp(self, test_data_fn, home_str): CRAMSApiTstCase.setUp(self) self.generate_test_data_fn = test_data_fn self.test_data = self.generate_test_data_fn(self.user.id, self.user_contact)
def setUp(self): CRAMSApiTstCase.setUp(self) self.test_data = sampleData.get_base_nectar_project_data( self.user.id, self.user_contact)
def setUp(self, test_data_fn): CRAMSApiTstCase.setUp(self) self.generate_test_data_fn = test_data_fn self.test_data = self.generate_test_data_fn(self.user.id, self.contact)
def setUp(self): CRAMSApiTstCase.setUp(self) self.http_request = self.factory.get('api/project') self.test_data = sampleData.get_base_nectar_project_data( self.user.id, self.user_contact)
def setUp(self): CRAMSApiTstCase.setUp(self) self.http_request = self.factory.get('api/project') self.test_data = get_base_nectar_project_data( self.user.id, self.contact)
def setUp(self): CRAMSApiTstCase.setUp(self)