|
|
@ -46,13 +46,9 @@ class TestWithLogin(TestCase): |
|
|
|
|
|
|
|
def test_project_of_year(self): |
|
|
|
''' test if the finance id is resettet ad start of year''' |
|
|
|
# self.client.login(username='vladimir', password='reiherzehe') |
|
|
|
acc = Account.objects.create(code='1234', description='blabla') |
|
|
|
#acc.save() |
|
|
|
startdate = date(2022,1,1) |
|
|
|
obj = Project.objects.create(account= acc, name='testproject', start=startdate) |
|
|
|
#obj.save() |
|
|
|
print(f'p_of_year: {obj.project_of_year}') |
|
|
|
self.assertEqual(obj.project_of_year,1) |
|
|
|
|
|
|
|
obj2 = Project.objects.create(account= acc, name='testproject2', start=startdate) |
|
|
@ -66,13 +62,9 @@ class TestWithLogin(TestCase): |
|
|
|
|
|
|
|
def test_finance_id(self): |
|
|
|
''' test if the finance id is resettet ad start of year''' |
|
|
|
# self.client.login(username='vladimir', password='reiherzehe') |
|
|
|
acc = Account.objects.create(code='1234', description='blabla') |
|
|
|
#acc.save() |
|
|
|
startdate = date(2022,1,1) |
|
|
|
obj = Project.objects.create(account= acc, name='testproject', start=startdate) |
|
|
|
#obj.save() |
|
|
|
# print(f'p_of_year: {obj.project_of_year}') |
|
|
|
self.assertEqual(obj.finance_id,"1234001") |
|
|
|
|
|
|
|
obj2 = Project.objects.create(account= acc, name='testproject2', start=startdate) |
|
|
|