', preview.description)
@@ -2252,7 +2252,7 @@ def test_create_comment_on_post_urls(self):
self.mox.ReplayAll()
obj = copy.deepcopy(COMMENT_OBJS[0])
- for post_url, cmt_url in urls.items():
+ for post_url, cmt_url in list(urls.items()):
obj.update({
'inReplyTo': [{'url': post_url}],
'content': 'my cmt',
@@ -2266,7 +2266,7 @@ def test_create_comment_on_post_urls(self):
def test_create_comment_with_photo(self):
self.expect_urlopen(
'547822715231468/comments', {'id': '456_789'},
- data=urllib.urlencode({'message': 'cc Sam G, Michael M',
+ data=urllib.parse.urlencode({'message': 'cc Sam G, Michael M',
'attachment_url': 'http://pict/ure'}))
self.mox.ReplayAll()
@@ -2282,7 +2282,7 @@ def test_create_comment_with_photo(self):
}, self.fb.create(obj).content)
preview = self.fb.preview_create(obj)
- self.assertEquals('cc Sam G, Michael M
![](http://pict/ure)
',
+ self.assertEqual('cc Sam G, Michael M
![](http://pict/ure)
',
preview.content)
self.assertIn('
comment on
this post:', preview.description)
self.assertIn('
', preview.description)
@@ -2379,7 +2379,7 @@ def test_create_rsvp(self):
'%s\n%s' % (created.content, rsvp))
preview = self.fb.preview_create(rsvp)
- self.assertEquals('
RSVP interested to '
+ self.assertEqual('
RSVP interested to '
'
this event.',
preview.description)
@@ -2427,8 +2427,8 @@ def test_create_with_photo(self):
# test preview
preview = self.fb.preview_create(obj)
- self.assertEquals('
post:', preview.description)
- self.assertEquals('my caption
![](http://my/picture)
',
+ self.assertEqual('
post:', preview.description)
+ self.assertEqual('my caption
![](http://my/picture)
',
preview.content)
# test create
@@ -2452,7 +2452,7 @@ def test_create_with_photo_uses_timeline_photos_album(self):
{'id': '1', 'name': 'foo bar'},
{'id': '2', 'type': 'wall'},
]})
- self.expect_urlopen('2/photos', {}, data=urllib.urlencode({
+ self.expect_urlopen('2/photos', {}, data=urllib.parse.urlencode({
'url': 'http://my/picture', 'message': ''}))
self.mox.ReplayAll()
self.assert_equals({'type': 'post', 'url': None}, self.fb.create(obj).content)
@@ -2473,7 +2473,7 @@ def test_create_with_photo_and_person_tags(self):
# test preview
preview = self.fb.preview_create(obj)
- self.assertEquals(
+ self.assertEqual(
'
with '
'Foo, '
'User 345',
@@ -2482,7 +2482,7 @@ def test_create_with_photo_and_person_tags(self):
# test create
self.expect_urlopen(API_ALBUMS % 'me', {'data': []})
self.expect_urlopen(
- API_PUBLISH_PHOTO, {'id': '123_456'}, data=urllib.urlencode({
+ API_PUBLISH_PHOTO, {'id': '123_456'}, data=urllib.parse.urlencode({
'url': 'http://my/picture',
'message': '',
'tags': json.dumps([{'tag_uid': '234'}, {'tag_uid': '345'}]),
@@ -2504,13 +2504,13 @@ def test_create_with_video(self):
# test preview
preview = self.fb.preview_create(obj)
- self.assertEquals('
post:', preview.description)
- self.assertEquals('my\ncaption