summaryrefslogtreecommitdiff
path: root/tests/commands/test_global.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/commands/test_global.py')
-rw-r--r--tests/commands/test_global.py28
1 files changed, 14 insertions, 14 deletions
diff --git a/tests/commands/test_global.py b/tests/commands/test_global.py
index 07b0df2a..94ad0672 100644
--- a/tests/commands/test_global.py
+++ b/tests/commands/test_global.py
@@ -84,12 +84,12 @@ class TestComposeCommand(unittest.TestCase):
self.assertIs(envelope.sign_key, None)
def test_get_template_decode(self):
- subject = u'This is a täßϑ subject.'
- to = u'recipient@mail.com'
- _from = u'foo.bar@mail.fr'
- body = u'Body\n地初店会継思識棋御招告外児山望掲領環。\n€mail body €nd.'
+ subject = 'This is a täßϑ subject.'
+ to = 'recipient@mail.com'
+ _from = 'foo.bar@mail.fr'
+ body = 'Body\n地初店会継思識棋御招告外児山望掲領環。\n€mail body €nd.'
with tempfile.NamedTemporaryFile('wb', delete=False) as f:
- txt = u'Subject: {}\nTo: {}\nFrom: {}\n{}'.format(subject, to,
+ txt = 'Subject: {}\nTo: {}\nFrom: {}\n{}'.format(subject, to,
_from, body)
f.write(txt.encode('utf-8'))
self.addCleanup(os.unlink, f.name)
@@ -109,14 +109,14 @@ class TestExternalCommand(unittest.TestCase):
@utilities.async_test
async def test_no_spawn_no_stdin_success(self):
ui = utilities.make_ui()
- cmd = g_commands.ExternalCommand(u'true', refocus=False)
+ cmd = g_commands.ExternalCommand('true', refocus=False)
await cmd.apply(ui)
ui.notify.assert_not_called()
@utilities.async_test
async def test_no_spawn_stdin_success(self):
ui = utilities.make_ui()
- cmd = g_commands.ExternalCommand(u"awk '{ exit $0 }'", stdin=u'0',
+ cmd = g_commands.ExternalCommand("awk '{ exit $0 }'", stdin='0',
refocus=False)
await cmd.apply(ui)
ui.notify.assert_not_called()
@@ -124,7 +124,7 @@ class TestExternalCommand(unittest.TestCase):
@utilities.async_test
async def test_no_spawn_no_stdin_attached(self):
ui = utilities.make_ui()
- cmd = g_commands.ExternalCommand(u'test -t 0', refocus=False)
+ cmd = g_commands.ExternalCommand('test -t 0', refocus=False)
await cmd.apply(ui)
ui.notify.assert_not_called()
@@ -132,7 +132,7 @@ class TestExternalCommand(unittest.TestCase):
async def test_no_spawn_stdin_attached(self):
ui = utilities.make_ui()
cmd = g_commands.ExternalCommand(
- u"test -t 0", stdin=u'0', refocus=False)
+ "test -t 0", stdin='0', refocus=False)
await cmd.apply(ui)
ui.notify.assert_called_once_with(
'editor has exited with error code 1 -- No stderr output',
@@ -141,7 +141,7 @@ class TestExternalCommand(unittest.TestCase):
@utilities.async_test
async def test_no_spawn_failure(self):
ui = utilities.make_ui()
- cmd = g_commands.ExternalCommand(u'false', refocus=False)
+ cmd = g_commands.ExternalCommand('false', refocus=False)
await cmd.apply(ui)
ui.notify.assert_called_once_with(
'editor has exited with error code 1 -- No stderr output',
@@ -153,7 +153,7 @@ class TestExternalCommand(unittest.TestCase):
@mock.patch.dict(os.environ, {'DISPLAY': ':0'})
async def test_spawn_no_stdin_success(self):
ui = utilities.make_ui()
- cmd = g_commands.ExternalCommand(u'true', refocus=False, spawn=True)
+ cmd = g_commands.ExternalCommand('true', refocus=False, spawn=True)
await cmd.apply(ui)
ui.notify.assert_not_called()
@@ -164,8 +164,8 @@ class TestExternalCommand(unittest.TestCase):
async def test_spawn_stdin_success(self):
ui = utilities.make_ui()
cmd = g_commands.ExternalCommand(
- u"awk '{ exit $0 }'",
- stdin=u'0', refocus=False, spawn=True)
+ "awk '{ exit $0 }'",
+ stdin='0', refocus=False, spawn=True)
await cmd.apply(ui)
ui.notify.assert_not_called()
@@ -175,7 +175,7 @@ class TestExternalCommand(unittest.TestCase):
@mock.patch.dict(os.environ, {'DISPLAY': ':0'})
async def test_spawn_failure(self):
ui = utilities.make_ui()
- cmd = g_commands.ExternalCommand(u'false', refocus=False, spawn=True)
+ cmd = g_commands.ExternalCommand('false', refocus=False, spawn=True)
await cmd.apply(ui)
ui.notify.assert_called_once_with(
'editor has exited with error code 1 -- No stderr output',