|
@ -52,8 +52,11 @@ class TestWithLogin(TestCase): |
|
|
startdate = date(2022,1,1) |
|
|
startdate = date(2022,1,1) |
|
|
obj = Project.objects.create(account= acc, name='testproject', start=startdate) |
|
|
obj = Project.objects.create(account= acc, name='testproject', start=startdate) |
|
|
#obj.save() |
|
|
#obj.save() |
|
|
print(f'pid: {obj.project_of_year}') |
|
|
|
|
|
|
|
|
print(f'p_of_year: {obj.project_of_year}') |
|
|
self.assertEqual(obj.project_of_year,1) |
|
|
self.assertEqual(obj.project_of_year,1) |
|
|
|
|
|
|
|
|
obj2 = Project.objects.create(account= acc, name='testproject2', start=startdate) |
|
|
obj2 = Project.objects.create(account= acc, name='testproject2', start=startdate) |
|
|
self.assertEqual(obj.project_of_year,2) |
|
|
|
|
|
|
|
|
self.assertEqual(obj2.project_of_year,2) |
|
|
|
|
|
|
|
|
|
|
|
obj3 = Project.objects.create(account= acc, name='testproject2', start=startdate) |
|
|
|
|
|
self.assertEqual(obj3.project_of_year,3) |