Exemplo n.º 1
0
 def test_submitted_report_doesnt_error(self):
     data = {
         'start_date': datetime.date(2012, 5, 1),
         'end_date': datetime.date(2012, 5, 17),
         'formatter': 'CSV'
     }
     generator = SubmittedBasketReportGenerator(**data)
     generator.generate()
Exemplo n.º 2
0
 def test_submitted_report_doesnt_error(self):
     data = {
         'start_date': datetime.date(2012, 5, 1),
         'end_date': datetime.date(2012, 5, 17),
         'formatter': 'CSV'
     }
     generator = SubmittedBasketReportGenerator(**data)
     generator.generate()
Exemplo n.º 3
0
 def test_submitted_report_filtering_by_date_range(self):
     date_submitted = datetime.datetime(2020, 7, 3).replace(tzinfo=utc)
     BasketFactory.create(status=Basket.SUBMITTED, date_submitted=date_submitted)
     data = {
         'start_date': datetime.date(2020, 7, 1),
         'end_date': datetime.date(2020, 8, 1),
         'formatter': 'CSV'
     }
     generator = SubmittedBasketReportGenerator(**data)
     assert generator.queryset.count() == 1
Exemplo n.º 4
0
 def test_submitted_report_doesnt_error(self):
     data = {"start_date": datetime.date(2012, 5, 1), "end_date": datetime.date(2012, 5, 17), "formatter": "CSV"}
     generator = SubmittedBasketReportGenerator(**data)
     generator.generate()
Exemplo n.º 5
0
 def test_submitted_report_queryset(self):
     generator = SubmittedBasketReportGenerator()
     assert generator.queryset.count() == 6
Exemplo n.º 6
0
 def test_submitted_report_doesnt_error(self):
     generator = SubmittedBasketReportGenerator()
     response = HttpResponse()
     generator.generate(response)