Beispiel #1
0
    def test_seq_nb_with_existing_transmittals(self):
        """If some trs exist, the first available seq nb is the next one."""
        for nb in range(5):
            self.create_transmittal(nb + 1)

        seq_nb = find_next_trs_number('CTR', self.entity, 'FAC10005')
        self.assertEqual(seq_nb, 6)
Beispiel #2
0
    def test_seq_nb_with_existing_transmittals(self):
        """If some trs exist, the first available seq nb is the next one."""
        for nb in range(5):
            self.create_transmittal(nb + 1)

        seq_nb = find_next_trs_number('CTR', self.entity, 'FAC10005')
        self.assertEqual(seq_nb, 6)
Beispiel #3
0
    def test_seq_nb_with_hole_in_numbers(self):
        """If there is a hole in the seq numbers, the first available nb is
        still the next one."""
        self.create_transmittal(1)
        self.create_transmittal(2)
        self.create_transmittal(5)
        self.create_transmittal(8)

        seq_nb = find_next_trs_number('CTR', self.entity, 'FAC10005')
        self.assertEqual(seq_nb, 9)
Beispiel #4
0
    def test_seq_nb_with_hole_in_numbers(self):
        """If there is a hole in the seq numbers, the first available nb is
        still the next one."""
        self.create_transmittal(1)
        self.create_transmittal(2)
        self.create_transmittal(5)
        self.create_transmittal(8)

        seq_nb = find_next_trs_number('CTR', self.entity, 'FAC10005')
        self.assertEqual(seq_nb, 9)
Beispiel #5
0
 def test_seq_nb_with_no_transmittal(self):
     """If no trs exists, the first available seq nb is 1."""
     seq_nb = find_next_trs_number('CTR', self.entity, 'FAC10005')
     self.assertEqual(seq_nb, 1)
Beispiel #6
0
 def test_seq_nb_with_no_transmittal(self):
     """If no trs exists, the first available seq nb is 1."""
     seq_nb = find_next_trs_number('CTR', self.entity, 'FAC10005')
     self.assertEqual(seq_nb, 1)