Commits

Marcin Kasperski  committed 220d79d

tests pass, not using space in tags

  • Participants
  • Parent commits 5fa3a0a

Comments (0)

Files changed (2)

File src/mekk/rtm/rtm_client.py

         r = None
 
         if set_tags is not None:
-            tag_text = ", ".join(set_tags)
+            tag_text = ",".join(set_tags)
             r = self.connector.call(
                 "rtm.tasks.setTags",
                 timeline = timeline,

File tests/test_helpers.py

     nt.assert_true('&method=rtm.tasks.getList&' in called_urls[0])
     nt.assert_true('&method=rtm.timelines.create&' in called_urls[1])
 
-    nt.assert_equal(called_urls[2], 'http://api.rememberthemilk.com/services/rest/?api_key=api-key&auth_token=33423&format=json&list_id=16097855&method=rtm.tasks.setTags&tags=%40dom%2C+krokodyl%2C+testy&task_id=137446193&taskseries_id=92141798&timeline=12345&api_sig=fc2e11facdd6726e3cd1befaa13bb407')
-    nt.assert_equal(called_urls[3], 'http://api.rememberthemilk.com/services/rest/?api_key=api-key&auth_token=33423&format=json&list_id=16097855&method=rtm.tasks.setTags&tags=%40dom%2C+testy&task_id=137654081&taskseries_id=92267415&timeline=12345&api_sig=6a584fb6432bb9452676123e95acc572')
+    nt.assert_equal(called_urls[2], 'http://api.rememberthemilk.com/services/rest/?api_key=api-key&auth_token=33423&format=json&list_id=16097855&method=rtm.tasks.setTags&tags=%40dom%2Ckrokodyl%2Ctesty&task_id=137446193&taskseries_id=92141798&timeline=12345&api_sig=9eb1901dbc1a51a8099590d757aa879f')
+    nt.assert_equal(called_urls[3], 'http://api.rememberthemilk.com/services/rest/?api_key=api-key&auth_token=33423&format=json&list_id=16097855&method=rtm.tasks.setTags&tags=%40dom%2Ctesty&task_id=137654081&taskseries_id=92267415&timeline=12345&api_sig=55cadb2d449bb90128b59b4ed5f8776d')
 
 @patch.object(httplib2.Http, 'request')
 def test_removeTags(mock_req):
     nt.assert_equal("tags="+tags[2],
                     urlencode(dict(tags='greg,jane,komputer,rodzina')))
     nt.assert_equal("tags="+tags[3],
-                    urlencode(dict(tags='mm,prezenty,zakupy,rodzina')))
+                    urlencode(dict(tags='mm,prezenty,rodzina,zakupy')))
     nt.assert_equal("tags="+tags[4],
                     urlencode(dict(tags='jane,lekarz,rodzina')))
     nt.assert_equal("tags="+tags[5],
-                    urlencode(dict(tags='@komputer,rodzina')))
+                    urlencode(dict(tags='jane,rodzina')))
     nt.assert_equal("tags="+tags[6],
-                    urlencode(dict(tags='@komputer,rodzina')))
+                    urlencode(dict(tags='jane,rodzina')))