aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tests/test_pluginapi.py
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2014-06-07 13:51:42 +0300
committerBerker Peksag <berker.peksag@gmail.com>2014-06-07 13:51:42 +0300
commitd9aced73f16b37eb24b24778f8f448769f1a7665 (patch)
tree9bf7657a972284cf1705758a6b168113657053ec /mediagoblin/tests/test_pluginapi.py
parent120fa4ae95329007c529b310f4e950146d44159f (diff)
downloadmediagoblin-d9aced73f16b37eb24b24778f8f448769f1a7665.tar.lz
mediagoblin-d9aced73f16b37eb24b24778f8f448769f1a7665.tar.xz
mediagoblin-d9aced73f16b37eb24b24778f8f448769f1a7665.zip
The file() builtin has been removed in Python 3. Use open() instead.
Diffstat (limited to 'mediagoblin/tests/test_pluginapi.py')
-rw-r--r--mediagoblin/tests/test_pluginapi.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mediagoblin/tests/test_pluginapi.py b/mediagoblin/tests/test_pluginapi.py
index eae0ce15..5a3d41e6 100644
--- a/mediagoblin/tests/test_pluginapi.py
+++ b/mediagoblin/tests/test_pluginapi.py
@@ -421,7 +421,7 @@ def test_plugin_assetlink(static_plugin_app):
junk_file_path = os.path.join(
linked_assets_dir.rstrip(os.path.sep),
'junk.txt')
- with file(junk_file_path, 'w') as junk_file:
+ with open(junk_file_path, 'w') as junk_file:
junk_file.write('barf')
os.unlink(plugin_link_dir)
@@ -440,14 +440,14 @@ to:
# link dir exists, but is a non-symlink
os.unlink(plugin_link_dir)
- with file(plugin_link_dir, 'w') as clobber_file:
+ with open(plugin_link_dir, 'w') as clobber_file:
clobber_file.write('clobbered!')
result = run_assetlink().collection[0]
assert result == 'Could not link "staticstuff": %s exists and is not a symlink\n' % (
plugin_link_dir)
- with file(plugin_link_dir, 'r') as clobber_file:
+ with open(plugin_link_dir, 'r') as clobber_file:
assert clobber_file.read() == 'clobbered!'