Skip to content

Commit 70b15a3

Browse files
committed
Unicode prefix not necessary in Python 3
1 parent dd0c4b5 commit 70b15a3

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

graphql_relay/node/tests/test_node.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -342,22 +342,22 @@ async def test_has_correct_node_root_field():
342342

343343

344344
def test_to_global_id_converts_unicode_strings_correctly():
345-
my_unicode_id = u'ûñö'
345+
my_unicode_id = 'ûñö'
346346
g_id = to_global_id('MyType', my_unicode_id)
347347
assert g_id == 'TXlUeXBlOsO7w7HDtg=='
348348

349-
my_unicode_id = u'\u06ED'
349+
my_unicode_id = '\u06ED'
350350
g_id = to_global_id('MyType', my_unicode_id)
351351
assert g_id == 'TXlUeXBlOtut'
352352

353353

354354
def test_from_global_id_converts_unicode_strings_correctly():
355-
my_unicode_id = u'ûñö'
355+
my_unicode_id = 'ûñö'
356356
my_type, my_id = from_global_id('TXlUeXBlOsO7w7HDtg==')
357357
assert my_type == 'MyType'
358358
assert my_id == my_unicode_id
359359

360-
my_unicode_id = u'\u06ED'
360+
my_unicode_id = '\u06ED'
361361
my_type, my_id = from_global_id('TXlUeXBlOtut')
362362
assert my_type == 'MyType'
363363
assert my_id == my_unicode_id

graphql_relay/tests/test_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77

88

99
def test_base64_encode_unicode_strings_correctly():
10-
my_unicode = u'ûñö'
10+
my_unicode = 'ûñö'
1111
my_base64 = utils.base64(my_unicode)
1212
assert my_base64 == base64.b64encode(my_unicode.encode('utf-8')).decode('utf-8')
1313

14-
my_unicode = u'\u06ED'
14+
my_unicode = '\u06ED'
1515
my_base64 = utils.base64(my_unicode)
1616
assert my_base64 == base64.b64encode(my_unicode.encode('utf-8')).decode('utf-8')
1717

@@ -23,7 +23,7 @@ def test_base64_encode_strings_correctly():
2323

2424

2525
def test_unbase64_decodes_unicode_strings_correctly():
26-
my_unicode = u'ûñö'
26+
my_unicode = 'ûñö'
2727
my_converted_unicode = utils.unbase64(utils.base64(my_unicode))
2828
assert my_unicode == my_converted_unicode
2929

0 commit comments

Comments
 (0)