Beispiel #1
0
    def test_customer_voipcall(self):
        # response = self.client.post('/voipcall_report/',
        #                data={'from_date': datetime.utcnow().replace(tzinfo=utc).strftime("%Y-%m-%d"),
        #                      'to_date': datetime.utcnow().replace(tzinfo=utc).strftime("%Y-%m-%d")})
        #self.assertEqual(response.status_code, 200)

        request = self.factory.get('/voipcall_report/')
        request.user = self.user
        request.session = {}
        response = voipcall_report(request)
        self.assertEqual(response.status_code, 200)
Beispiel #2
0
    def test_customer_voipcall(self):
        # response = self.client.post('/voipcall_report/',
        #                data={'from_date': datetime.utcnow().replace(tzinfo=utc).strftime("%Y-%m-%d"),
        #                      'to_date': datetime.utcnow().replace(tzinfo=utc).strftime("%Y-%m-%d")})
        #self.assertEqual(response.status_code, 200)

        request = self.factory.get('/voipcall_report/')
        request.user = self.user
        request.session = {}
        response = voipcall_report(request)
        self.assertEqual(response.status_code, 200)
Beispiel #3
0
    def test_customer_voipcall(self):
        """Test Function to check VoIP call report"""
        response = self.client.get("/voipcall_report/")
        self.assertEqual(response.status_code, 200)
        self.assertTemplateUsed(response, "frontend/report/voipcall_report.html")

        response = self.client.post(
            "/voipcall_report/",
            data={"from_date": datetime.now().strftime("%Y-%m-%d"), "to_date": datetime.now().strftime("%Y-%m-%d")},
        )
        self.assertEqual(response.status_code, 200)

        request = self.factory.get("/voipcall_report/")
        request.user = self.user
        request.session = {}
        response = voipcall_report(request)
        self.assertEqual(response.status_code, 200)
Beispiel #4
0
    def test_customer_voipcall(self):
        """Test Function to check VoIP call report"""
        response = self.client.get('/voipcall_report/')
        self.assertEqual(response.status_code, 200)
        self.assertTemplateUsed(response,
                                'frontend/report/voipcall_report.html')

        response = self.client.post('/voipcall_report/',
                                    data={
                                        'from_date':
                                        datetime.now().strftime("%Y-%m-%d"),
                                        'to_date':
                                        datetime.now().strftime("%Y-%m-%d")
                                    })
        self.assertEqual(response.status_code, 200)

        request = self.factory.get('/voipcall_report/')
        request.user = self.user
        request.session = {}
        response = voipcall_report(request)
        self.assertEqual(response.status_code, 200)