예제 #1
0
파일: tests.py 프로젝트: lgoldbach/parkour
    def test_billing_periods_list(self):
        sequencer = create_sequencer(get_random_name())

        flowcell1 = create_flowcell(get_random_name(), sequencer)
        flowcell1.create_time = datetime(2017, 11, 1, 0, 0, 0, tzinfo=pytz.UTC)
        flowcell1.save()

        flowcell2 = create_flowcell(get_random_name(), sequencer)
        flowcell2.create_time = datetime(2017, 12, 1, 0, 0, 0, tzinfo=pytz.UTC)
        flowcell2.save()

        response = self.client.get(reverse('invoicing-billing-periods'))
        self.assertEqual(response.status_code, status.HTTP_200_OK)
        self.assertEqual(response.data, [
            {
                'name': 'November 2017',
                'value': [2017, 11],
                'report_url': ''
            },
            {
                'name': 'December 2017',
                'value': [2017, 12],
                'report_url': ''
            },
        ])
예제 #2
0
파일: tests.py 프로젝트: lgoldbach/parkour
    def setUp(self):
        self.create_user()
        self.login()

        sequencer = create_sequencer(get_random_name())
        read_length = create_read_length(get_random_name())
        self.cost = create_sequencing_cost(sequencer, read_length, 10)
예제 #3
0
파일: tests.py 프로젝트: lgoldbach/parkour
 def setUp(self):
     self.sequencer = create_sequencer(get_random_name())
     self.read_length = create_read_length(get_random_name())
     self.cost = create_sequencing_cost(self.sequencer, self.read_length,
                                        10)
예제 #4
0
파일: tests.py 프로젝트: lgoldbach/parkour
 def setUp(self):
     self.sequencer = create_sequencer(get_random_name())
     self.cost = create_fixed_cost(self.sequencer, 10)