summaryrefslogtreecommitdiff
path: root/oslotest/tests/unit/test_createfile.py
diff options
context:
space:
mode:
authorsongwenping <songwenping@inspur.com>2022-04-19 20:00:54 +0800
committersongwenping <songwenping@inspur.com>2022-04-19 20:01:18 +0800
commit49948dfad1845ee151e815201c786e97c6e3c09c (patch)
tree0cfd64c7536c9ed4c26e1d03a3799d20430cd1b7 /oslotest/tests/unit/test_createfile.py
parent47fe8a263fb2843879d9167da230d0a9550965cf (diff)
downloadoslotest-49948dfad1845ee151e815201c786e97c6e3c09c.tar.gz
Remove unnecessary unicode prefixes
Change-Id: I554dee8e91468f8ea2dbcb99a925a2e9057ac378
Diffstat (limited to 'oslotest/tests/unit/test_createfile.py')
-rw-r--r--oslotest/tests/unit/test_createfile.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/oslotest/tests/unit/test_createfile.py b/oslotest/tests/unit/test_createfile.py
index bed5a99..c16d409 100644
--- a/oslotest/tests/unit/test_createfile.py
+++ b/oslotest/tests/unit/test_createfile.py
@@ -27,25 +27,25 @@ class CreateFileWithContentTest(base.BaseTestCase):
def test_create_unicode_files(self):
f = createfile.CreateFileWithContent(
"no_approve",
- u'ಠ_ಠ',
+ 'ಠ_ಠ',
)
f.setUp()
with open(f.path, 'rb') as f:
contents = f.read()
- self.assertEqual(u'ಠ_ಠ', six.text_type(contents, encoding='utf-8'))
+ self.assertEqual('ಠ_ಠ', six.text_type(contents, encoding='utf-8'))
def test_create_unicode_files_encoding(self):
f = createfile.CreateFileWithContent(
- "embarrassed", u'⊙﹏⊙', encoding='utf-8',
+ "embarrassed", '⊙﹏⊙', encoding='utf-8',
)
f.setUp()
with open(f.path, 'rb') as f:
contents = f.read()
- self.assertEqual(u'⊙﹏⊙', six.text_type(contents, encoding='utf-8'))
+ self.assertEqual('⊙﹏⊙', six.text_type(contents, encoding='utf-8'))
def test_create_bad_encoding(self):
f = createfile.CreateFileWithContent(
- "hrm", u'ಠ~ಠ', encoding='ascii',
+ "hrm", 'ಠ~ಠ', encoding='ascii',
)
self.assertRaises(UnicodeError, f.setUp)