|
@@ -316,7 +316,7 @@ class InvoiceQuerySetTests(TestCase):
|
|
|
@freeze_time('2016-01-01')
|
|
|
def test_number_workflow(self):
|
|
|
iv = Invoice.objects.create()
|
|
|
- self.assertEqual(iv.number, 'DRAFT-1')
|
|
|
+ self.assertEqual(iv.number, 'DRAFT-{}'.format(iv.pk))
|
|
|
iv.validate()
|
|
|
self.assertRegexpMatches(iv.number, r'2016-01-000001$')
|
|
|
|