def test_system_list_context_without_api(self): """test list view""" # remove app from dfirtrack.settings if 'dfirtrack_api' in installed_apps: installed_apps.remove('dfirtrack_api') # login testuser self.client.login(username='******', password='******') # get response response = self.client.get('/system/') # compare self.assertFalse(response.context['dfirtrack_api'])
def test_case_detail_context_without_artifacts(self): """test detail view""" # remove app from dfirtrack.settings if 'dfirtrack_artifacts' in installed_apps: installed_apps.remove('dfirtrack_artifacts') # get object case_1 = Case.objects.get(case_name='case_1') # login testuser self.client.login(username='******', password='******') # get response response = self.client.get('/case/' + str(case_1.case_id) + '/') # compare self.assertFalse(response.context['dfirtrack_artifacts'])
def test_system_detail_context_without_api(self): """test detail view""" # remove app from dfirtrack.settings if 'dfirtrack_api' in installed_apps: installed_apps.remove('dfirtrack_api') # get object system_1 = System.objects.get(system_name='system_1') # login testuser self.client.login(username='******', password='******') # get response response = self.client.get('/system/' + str(system_1.system_id) + '/') # compare self.assertFalse(response.context['dfirtrack_api'])