kopia lustrzana https://github.com/snarfed/bridgy-fed
use future unicode string literals, drop u qualifier
rodzic
b613eaa3b4
commit
5bb62f4021
|
@ -10,7 +10,7 @@ from oauth_dropins.webutil.models import StringIdModel
|
|||
class MagicKey(StringIdModel):
|
||||
"""Stores a user's public/private key pair used for Magic Signatures.
|
||||
|
||||
The key name is USERNAME@DOMAIN.
|
||||
The key name is the domain.
|
||||
|
||||
The modulus and exponent properties are all encoded as base64url (ie URL-safe
|
||||
base64) strings as described in RFC 4648 and section 5.1 of the Magic
|
||||
|
|
|
@ -37,7 +37,7 @@ class ActivityPubTest(unittest.TestCase):
|
|||
self.assertEquals(activitypub.CONTENT_TYPE_AS2, got.headers['Content-Type'])
|
||||
self.assertEquals({
|
||||
'objectType' : 'person',
|
||||
'displayName': u'Mrs. ☕ Foo',
|
||||
'displayName': 'Mrs. ☕ Foo',
|
||||
'url': 'https://foo.com/about-me',
|
||||
'inbox': 'http://localhost/foo.com/inbox',
|
||||
}, json.loads(got.body))
|
||||
|
@ -68,7 +68,7 @@ class ActivityPubTest(unittest.TestCase):
|
|||
body=json.dumps({
|
||||
'@context': 'https://www.w3.org/ns/activitystreams',
|
||||
'type': 'Note',
|
||||
'content': u'A ☕ reply',
|
||||
'content': 'A ☕ reply',
|
||||
'url': 'http://this/reply',
|
||||
'inReplyTo': 'http://orig/post',
|
||||
'cc': ['https://www.w3.org/ns/activitystreams#Public'],
|
||||
|
|
|
@ -15,7 +15,7 @@ from add_webmention import app
|
|||
class AddWebmentionTest(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.resp = requests_response(u'asdf ☕ qwert', headers={
|
||||
self.resp = requests_response('asdf ☕ qwert', headers={
|
||||
'Link': 'first',
|
||||
'Foo': 'bar',
|
||||
})
|
||||
|
|
|
@ -63,14 +63,14 @@ class WebmentionTest(testutil.TestCase):
|
|||
article = requests_response({
|
||||
'@context': ['https://www.w3.org/ns/activitystreams'],
|
||||
'type': 'Article',
|
||||
'content': u'Lots of ☕ words...',
|
||||
'content': 'Lots of ☕ words...',
|
||||
'actor': {
|
||||
'url': 'http://orig/author',
|
||||
},
|
||||
})
|
||||
actor = requests_response({
|
||||
'objectType' : 'person',
|
||||
'displayName': u'Mrs. ☕ Foo',
|
||||
'displayName': 'Mrs. ☕ Foo',
|
||||
'url': 'https://foo.com/about-me',
|
||||
'inbox': 'https://foo.com/inbox',
|
||||
})
|
||||
|
@ -96,8 +96,8 @@ class WebmentionTest(testutil.TestCase):
|
|||
self.assertEqual({
|
||||
'objectType': 'comment',
|
||||
'url': 'http://a/reply',
|
||||
'displayName': u'foo ☕ bar',
|
||||
'content': u' <a class="u-in-reply-to" href="http://orig/post">foo ☕ bar</a> ',
|
||||
'displayName': 'foo ☕ bar',
|
||||
'content': ' <a class="u-in-reply-to" href="http://orig/post">foo ☕ bar</a> ',
|
||||
'inReplyTo': 'http://orig/post',
|
||||
'cc': [
|
||||
activitypub.PUBLIC_AUDIENCE,
|
||||
|
@ -162,7 +162,7 @@ class WebmentionTest(testutil.TestCase):
|
|||
'ref': 'tag:fed.brid.gy,2017-08-22:orig-post'
|
||||
}, entry['thr_in-reply-to'])
|
||||
self.assertEquals(
|
||||
u'<a class="u-in-reply-to" href="http://orig/post">foo ☕ bar</a>',
|
||||
'<a class="u-in-reply-to" href="http://orig/post">foo ☕ bar</a>',
|
||||
entry.content[0]['value'])
|
||||
|
||||
def test_salmon_get_salmon_from_webfinger(self, mock_get, mock_post):
|
||||
|
|
Ładowanie…
Reference in New Issue