Repository :
http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
---------------------------------------------------------------
commit f345b97e16619cd92acc0e5f842668c0825826cb
Author: Johan Cwiklinski <johan(a)x-tnd.be>
Date: Sun Nov 4 12:18:40 2012 +0100
Incorrect method name, add unit test
---------------------------------------------------------------
fedocal/__init__.py | 2 +-
fedocal/fedocallib/__init__.py | 2 +-
fedocal/tests/test_fedocallib.py | 3 +++
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/fedocal/__init__.py b/fedocal/__init__.py
index 2100223..996fe9e 100644
--- a/fedocal/__init__.py
+++ b/fedocal/__init__.py
@@ -121,7 +121,7 @@ def calendar_fullday(calendar_name, year, month, day):
auth_form = forms.LoginForm()
admin = is_admin()
month_name = fedocallib.MONTH[week_start.month - 1]
- curmonth_cal = fedocallib.getHtmlMonthlyCal()
+ curmonth_cal = fedocallib.get_html_monthly_cal()
return flask.render_template('agenda.html',
calendar=calendarobj,
calendars=calendars,
diff --git a/fedocal/fedocallib/__init__.py b/fedocal/fedocallib/__init__.py
index 8143207..3f1080e 100644
--- a/fedocal/fedocallib/__init__.py
+++ b/fedocal/fedocallib/__init__.py
@@ -514,7 +514,7 @@ def add_meetings_to_vcal(ical, meetings):
for meeting in meetings:
add_meeting_to_vcal(ical, meeting)
-def getHtmlMonthlyCal():
+def get_html_monthly_cal():
htmlcal = pycalendar.HTMLCalendar()
curdate = date.today()
curmonth_cal_nf = htmlcal.formatmonth(curdate.year, curdate.month)
diff --git a/fedocal/tests/test_fedocallib.py b/fedocal/tests/test_fedocallib.py
index d6ab40c..b5e1ee8 100644
--- a/fedocal/tests/test_fedocallib.py
+++ b/fedocal/tests/test_fedocallib.py
@@ -696,6 +696,9 @@ class Fedocallibtests(Modeltests):
self.assertNotEqual(obj, None)
self.assertEqual(len(obj), 0)
+ def test_get_html_monthly_cal(self):
+ self.assertEqual('string' in output)
+
if __name__ == '__main__':
SUITE = unittest.TestLoader().loadTestsFromTestCase(Fedocallibtests)