

@mock.patch_object(delicious, 'DeliciousClient', FakeClient)
def test_update(self):
    delicious.update()
    FakeClient.assert_called_with(settings.DELICIOUS_USERNAME, settings.DELICIOUS_PASSWORD)
    FakeClient.posts.update.assert_called_with()
    FakeClient.posts.dates.assert_called_with()
    FakeClient.posts.get.assert_called_with(dt='2009-08-18')
    b = Bookmark.objects.get(url='http://jacobian.org/')
    self.assertEqual(b.description, 'Me!')
    i = Item.objects.get(content_type__model='bookmark', object_id=b.pk)
    self.assertEqual(i.timestamp.date(), datetime.date(2009, 8, 18))
    self.assertEqual(i.tags, 'me jacob jacobian')

dataset/ETHPy150Open jacobian-archive/jellyroll/src/jellyroll/tests/providers/test_delicious.py DeliciousProviderTests.test_update/original