Repository :
http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
---------------------------------------------------------------
commit 44f182481d6c388cb78770e81ba8b0c44d229ed7
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Tue Nov 13 18:11:18 2012 +0100
Fix the test_fedocallib add_meeting tests
It raises an InvalidMeeting error not an AttributeError but only
when the date is enough in the past to not be in the future.
TODAY refers to the Tuesday of the current week, if the tests are
ran on a Monday, then TODAY is actually in the future and the tests
does not raise a InvalidMeeting but an AttributeError in this case
(pretty much like the first test in this method).
By changing the date to TODAY - 4 days, we are sure that we are
trying to add a meeting in the past (last week), so the output
of the test should be always consistent.
---------------------------------------------------------------
fedocal/tests/test_fedocallib.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fedocal/tests/test_fedocallib.py b/fedocal/tests/test_fedocallib.py
index 1157edc..380e9be 100644
--- a/fedocal/tests/test_fedocallib.py
+++ b/fedocal/tests/test_fedocallib.py
@@ -645,9 +645,9 @@ class Fedocallibtests(Modeltests):
None, None,
None, None)
- self.assertRaises(AttributeError, fedocallib.add_meeting,
+ self.assertRaises(InvalidMeeting, fedocallib.add_meeting,
self.session, calendarobj, fasuser,
- None, TODAY - timedelta(days=1),
+ None, TODAY - timedelta(days=4),
9, 10, None,
None, None, None,
None, None,