예제 #1
0
파일: tests.py 프로젝트: akashagarwal/qPaaS
    def test_show_integrations(self):
        request = self.factory.get('/acquisition_counter/')

        request.user = self.user

        response = views.integrations(request)
        self.assertEqual(response.status_code, 200)
예제 #2
0
파일: tests.py 프로젝트: akashagarwal/qPaaS
    def test_create_integration(self):
        idProject = Project.objects.filter(name='test')[0].id
        request = self.factory.post('/integrations/', {'user': self.user, 'tool': 0, 'project': idProject, 'url': '-', 'username': '******', 'password': 0, 'query': '-'})

        request.user = self.user

        response = views.integrations(request)
        integrations = len(Integration.objects.all())

        self.assertEqual(integrations, 2)