def test_download_string(self): httpretty.register_uri(GET, util.STORAGE_URL + '/contname/objectname', status=200, body='object content') o = SwiftestObject(self.client, 'contname', 'objectname') string = o.download_string(encoding='utf-8') self.assertEqual(string, u'object content')