Beispiel #1
0
 def test_open_report_doesnt_error(self):
     data = {
         'start_date': datetime.date(2012, 5, 1),
         'end_date': datetime.date(2012, 5, 17),
         'formatter': 'CSV'
     }
     generator = OpenBasketReportGenerator(**data)
     generator.generate()
Beispiel #2
0
 def test_open_report_doesnt_error(self):
     data = {
         'start_date': datetime.date(2012, 5, 1),
         'end_date': datetime.date(2012, 5, 17),
         'formatter': 'CSV'
     }
     generator = OpenBasketReportGenerator(**data)
     generator.generate()
 def test_open_report_filtering_by_date_range(self):
     BasketFactory.create(status=Basket.OPEN)
     data = {
         'start_date': datetime.date(2020, 5, 1),
         'end_date': datetime.date(2020, 6, 1),
         'formatter': 'CSV'
     }
     generator = OpenBasketReportGenerator(**data)
     assert generator.queryset.count() == 1
 def test_open_report_doesnt_error(self):
     data = {"start_date": datetime.date(2012, 5, 1), "end_date": datetime.date(2012, 5, 17), "formatter": "CSV"}
     generator = OpenBasketReportGenerator(**data)
     generator.generate()
 def test_open_report_queryset(self):
     generator = OpenBasketReportGenerator()
     assert generator.queryset.count() == 5
Beispiel #6
0
 def test_open_report_doesnt_error(self):
     generator = OpenBasketReportGenerator()
     response = HttpResponse()
     generator.generate(response)