test.py 393 Bytes
Newer Older
1 2
import planner

3
app = planner.Application()
4

5
project = planner.Project(app)
6 7 8 9 10 11 12 13 14 15 16 17 18

t1 = planner.Task()
t1.set_name('T1')
t1.set_property('work', 8*60*60)
project.insert_task(task=t1)

r1 = planner.Resource()
r1.set_name('R1')
project.add_resource(r1)
r1.set_custom_property('cost',125.0)
r1.assign(t1,100)

if t1.get_cost() == 125*8:
19
        print 'Test1 .... OK'
20 21 22 23
else:
	print 'Test1 .... FAILED'