forked from beba/foerderbarometer
fixed pid test
This commit is contained in:
parent
22aec6fdde
commit
28a42b1709
|
|
@ -72,17 +72,17 @@ class ModelTestCase(TestCase):
|
|||
acc = self.account
|
||||
startdate = date(2022, 1, 1)
|
||||
obj = Project.objects.create(account=acc, name='testproject', start=startdate)
|
||||
self.assertEqual(obj.pid, "1234-00000001")
|
||||
self.assertEqual(obj.pid, "123400000001")
|
||||
self.assertEqual(obj.account.code, "1234")
|
||||
|
||||
obj2 = Project.objects.create(account=acc, name='testproject2', start=startdate)
|
||||
self.assertEqual(obj2.pid, "1234-00000002")
|
||||
self.assertEqual(obj2.pid, "123400000002")
|
||||
|
||||
olddate = date(2021, 12, 31)
|
||||
obj4 = Project.objects.create(account=acc, name='testproject2', start=olddate)
|
||||
|
||||
obj3 = Project.objects.create(account=acc, name='testproject2', start=startdate)
|
||||
self.assertEqual(obj3.pid, "1234-00000004")
|
||||
self.assertEqual(obj3.pid, "123400000004")
|
||||
|
||||
def test_literature(self):
|
||||
obj = Literature.objects.create(cost='100', notes='jolo', selfbuy_give_data=False)
|
||||
|
|
|
|||
Loading…
Reference in New Issue