Revision: 2639
Author: janne.t.harkonen
Date: Tue Mar 16 02:27:11 2010
Log: Properly count vacation
http://code.google.com/p/robotframework/source/detail?r=2639
Modified:
/trunk/proto/atdd_example/VacalcLibrary.py
=======================================
--- /trunk/proto/atdd_example/VacalcLibrary.py Mon Mar 15 13:37:29 2010
+++ /trunk/proto/atdd_example/VacalcLibrary.py Tue Mar 16 02:27:11 2010
@@ -1,8 +1,9 @@
import os
import sys
import subprocess
-
-from vacalc import Employee, EmployeeStore
+import datetime
+
+from vacalc import Employee, EmployeeStore, Vacation
class VacalcLibrary(object):
@@ -11,7 +12,8 @@
self._db_file = db_file
def count_vacation(self, startdate, year):
- return Employee('Foo', startdate).count_vacation(year)
+ resource = Employee('Test Resource', startdate)
+ return Vacation(resource._startdate, int(year)).days
def clear_database(self):
if os.path.isfile(self._db_file):