@@ -37,10 +37,18 @@ def test_project_statistic_list(
3737 is_employed = is_employed ,
3838 is_external = False ,
3939 )
40- report = ReportFactory .create (duration = timedelta (hours = 1 ))
40+ report = ReportFactory .create (
41+ duration = timedelta (hours = 1 ),
42+ task__project__total_remaining_effort = timedelta (hours = 3 ),
43+ task__project__estimated_time = timedelta (hours = 7 ),
44+ )
4145 project = report .task .project
4246 ReportFactory .create (duration = timedelta (hours = 2 ), task = report .task )
43- report2 = ReportFactory .create (duration = timedelta (hours = 4 ))
47+ report2 = ReportFactory .create (
48+ duration = timedelta (hours = 4 ),
49+ task__project__total_remaining_effort = timedelta (hours = 5 ),
50+ task__project__estimated_time = timedelta (hours = 2 ),
51+ )
4452 project_2 = report2 .task .project
4553 task = TaskFactory (project = report .task .project )
4654 ReportFactory .create (duration = timedelta (hours = 2 ), task = task )
@@ -65,8 +73,8 @@ def test_project_statistic_list(
6573 "amount-offered-currency" : project_2 .amount_offered_currency ,
6674 "amount-invoiced" : str (project_2 .amount_invoiced .amount ),
6775 "amount-invoiced-currency" : project_2 .amount_invoiced_currency ,
68- "estimated-time" : "00 :00:00" ,
69- "total-remaining-effort" : "00 :00:00" ,
76+ "estimated-time" : "02 :00:00" ,
77+ "total-remaining-effort" : "05 :00:00" ,
7078 },
7179 "relationships" : {
7280 "customer" : {
@@ -87,8 +95,8 @@ def test_project_statistic_list(
8795 "amount-offered-currency" : project .amount_offered_currency ,
8896 "amount-invoiced" : str (project .amount_invoiced .amount ),
8997 "amount-invoiced-currency" : project .amount_invoiced_currency ,
90- "estimated-time" : "00 :00:00" ,
91- "total-remaining-effort" : "00 :00:00" ,
98+ "estimated-time" : "07 :00:00" ,
99+ "total-remaining-effort" : "03 :00:00" ,
92100 },
93101 "relationships" : {
94102 "customer" : {
@@ -102,6 +110,8 @@ def test_project_statistic_list(
102110 ]
103111 assert json ["data" ] == expected_json
104112 assert json ["meta" ]["total-time" ] == "09:00:00"
113+ assert json ["meta" ]["total-estimated-time" ] == "09:00:00"
114+ assert json ["meta" ]["total-remaining-effort" ] == "08:00:00"
105115
106116
107117@pytest .mark .parametrize (
0 commit comments