Esempio n. 1
0
 def do_test(self, params, write=True):
     response = self.client.get(
         '/wms/datasets/{}'.format(self.dataset_slug), params)
     self.assertEqual(response.status_code, 200)
     if write is True:
         with open(image_path(self.__class__.__name__, self.image_name()),
                   "wb") as f:
             f.write(response.content)
Esempio n. 2
0
 def do_test(self, params, fmt=None, write=True):
     fmt = fmt or 'png'
     response = self.client.get('/wms/datasets/{}'.format(self.dataset_slug), params)
     self.assertEqual(response.status_code, 200)
     outfile = image_path(self.__class__.__name__, self.image_name(fmt))
     if write is True:
         with open(outfile, "wb") as f:
             f.write(response.content)
     return outfile
Esempio n. 3
0
 def do_test(self, params, fmt=None, write=True):
     fmt = fmt or 'png'
     response = self.client.get('/wms/datasets/{}'.format(self.dataset_slug), params)
     self.assertEqual(response.status_code, 200)
     outfile = image_path(self.__class__.__name__, self.image_name(fmt))
     if write is True:
         with open(outfile, "wb") as f:
             f.write(response.content)
     return outfile
Esempio n. 4
0
 def do_test(self, params, write=True):
     response = self.client.get('/wms/datasets/{}'.format(self.dataset_slug), params)
     self.assertEqual(response.status_code, 200)
     if write is True:
         with open(image_path(self.__class__.__name__, self.image_name()), "wb") as f:
             f.write(response.content)