[hamster-applet] test parsing of tags
- From: Toms Baugis <tbaugis src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [hamster-applet] test parsing of tags
- Date: Fri, 22 Jan 2010 01:05:35 +0000 (UTC)
commit b9719f145d69cf3be70f50d309066a3e95d729e6
Author: Toms Bauģis <toms baugis gmail com>
Date: Fri Jan 22 01:04:47 2010 +0000
test parsing of tags
tests/stuff_test.py | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/tests/stuff_test.py b/tests/stuff_test.py
index dd690b4..50dae2b 100644
--- a/tests/stuff_test.py
+++ b/tests/stuff_test.py
@@ -54,6 +54,15 @@ class TestActivityInputParsing(unittest.TestCase):
assert activity.category_name is None and activity.start_time is None \
and activity.end_time is None and activity.category_name is None
+ def test_tags(self):
+ # plain activity name
+ activity = stuff.parse_activity_input("case, with added #de description #and, #some #tags")
+ self.assertEquals(activity.activity_name, "case")
+ self.assertEquals(activity.description, "with added #de description")
+ self.assertEquals(activity.tags, ["tags", "some", "and"]) #the list is parsed from the other end
+ assert activity.category_name is None and activity.start_time is None \
+ and activity.end_time is None
+
def test_full(self):
# plain activity name
activity = stuff.parse_activity_input("1225-1325 case cat, description")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]