コード例 #1
0
 def test_export_text_get(self):
     # format the stubdata using the code
     exported_data = Export(export.form_data).get(EXPORT_FORMATS[4])
     # now compare it with an already formatted data that we know is correct
     self.assertEqual (exported_data.status_code, 200)
コード例 #2
0
 def test_export_csv_get(self):
     # format the stubdata using the code
     exported_data = Export(export.form_data).get(EXPORT_FORMATS[0])
     # now check the status_code to be 200
     self.assertEqual (exported_data.status_code, 200)
コード例 #3
0
 def test_export_text_format2(self):
     # format the stubdata using the code
     exported_data = Export(export.form_data).format(EXPORT_FORMATS[5])
     # now compare it with an already formatted data that we know is correct
     self.assertEqual(exported_data, export.text)
コード例 #4
0
 def test_export_excel_div_format(self):
     # format the stubdata using the code
     exported_data = Export(export.form_data).format(EXPORT_FORMATS[3])
     # now compare it with an already formatted data that we know is correct
     self.assertEqual(len(exported_data), 5632)
コード例 #5
0
 def test_export_excel_div_get(self):
     # format the stubdata using the code
     exported_data = Export(export.form_data).get(EXPORT_FORMATS[3])
     # now compare it with an already formatted data that we know is correct
     assert (exported_data.status_code == 200)
コード例 #6
0
 def test_export_csv_div_format(self):
     # format the stubdata using the code
     exported_data = Export(export.form_data).format(EXPORT_FORMATS[1])
     # now compare it with an already formatted data that we know is correct
     assert(exported_data == export.csv_div)