def test_allow_xls_export_for_basic_auth(self):
     extra = {
         'HTTP_AUTHORIZATION':
         http_auth_string(self.login_username, self.login_password)
     }
     response = self.anon.get(self.xls_url, **extra)
     self.assertEqual(response.status_code, 200)
Exemplo n.º 2
0
 def test_allow_xls_export_for_basic_auth(self):
     extra = {
         'HTTP_AUTHORIZATION': http_auth_string(self.login_username,
                                                self.login_password)
     }
     response = self.anon.get(self.xls_url, **extra)
     self.assertEqual(response.status_code, 200)
Exemplo n.º 3
0
 def test_dl_json_for_basic_auth(self):
     extra = {"HTTP_AUTHORIZATION": http_auth_string(self.login_username, self.login_password)}
     response = self.anon.get(
         reverse(download_jsonform, kwargs={"username": self.user.username, "id_string": self.xform.id_string}),
         **extra
     )
     self.assertEqual(response.status_code, 200)
Exemplo n.º 4
0
 def test_allow_kml_export_for_basic_auth(self):
     extra = {
         'HTTP_AUTHORIZATION': http_auth_string(self.login_username,
                                                self.login_password)
     }
     url = reverse(kml_export, kwargs={'username': self.user.username,
                                       'id_string': self.xform.id_string})
     response = self.anon.get(url, **extra)
     self.assertEqual(response.status_code, 200)
Exemplo n.º 5
0
 def test_dl_xls_for_basic_auth(self):
     extra = {
         'HTTP_AUTHORIZATION':
         http_auth_string(self.login_username, self.login_password)
     }
     response = self.anon.get(reverse(download_xlsform, kwargs={
         'username': self.user.username,
         'id_string': self.xform.id_string
     }), **extra)
     self.assertEqual(response.status_code, 200)
Exemplo n.º 6
0
 def test_dl_xls_for_basic_auth(self):
     extra = {
         'HTTP_AUTHORIZATION':
         http_auth_string(self.login_username, self.login_password)
     }
     response = self.anon.get(reverse(download_xlsform, kwargs={
         'username': self.user.username,
         'id_string': self.xform.id_string
     }), **extra)
     self.assertEqual(response.status_code, 200)
Exemplo n.º 7
0
 def test_allow_export_download_for_basic_auth(self):
     extra = {
         'HTTP_AUTHORIZATION': http_auth_string(self.login_username,
                                                self.login_password)
     }
     # create export
     export = generate_export(Export.CSV_EXPORT, 'csv', self.user.username,
                              self.xform.id_string)
     self.assertTrue(isinstance(export, Export))
     url = reverse(export_download, kwargs={
         'username': self.user.username,
         'id_string': self.xform.id_string,
         'export_type': export.export_type,
         'filename': export.filename
     })
     response = self.anon.get(url, **extra)
     self.assertEqual(response.status_code, 200)
 def test_allow_export_download_for_basic_auth(self):
     extra = {
         'HTTP_AUTHORIZATION':
         http_auth_string(self.login_username, self.login_password)
     }
     # create export
     export = generate_export(Export.CSV_EXPORT, 'csv', self.user.username,
                              self.xform.id_string)
     self.assertTrue(isinstance(export, Export))
     url = reverse(export_download,
                   kwargs={
                       'username': self.user.username,
                       'id_string': self.xform.id_string,
                       'export_type': export.export_type,
                       'filename': export.filename
                   })
     response = self.anon.get(url, **extra)
     self.assertEqual(response.status_code, 200)