self.images = {}
# NOTE(justinsb): The OpenStack API can't upload an image?
# So, make sure we've got one..
- timestamp = datetime.datetime(2011, 01, 01, 01, 02, 03)
+ timestamp = datetime.datetime(2011, 1, 1, 1, 2, 3)
image1 = {'id': '155d900f-4e14-4e4c-a73d-069cbf4541e6',
'name': 'fakeimage123456',
exit 1
''')
fp.close()
- os.chmod(tmpfilename, 0755)
+ os.chmod(tmpfilename, 0o755)
self.assertRaises(exception.ProcessExecutionError,
utils.execute,
tmpfilename, tmpfilename2, attempts=10,
grep foo
''')
fp.close()
- os.chmod(tmpfilename, 0755)
+ os.chmod(tmpfilename, 0o755)
utils.execute(tmpfilename,
tmpfilename2,
process_input='foo',
def _create_file(self, path, size):
with open(path, "ab") as f:
f.truncate(size)
- os.chmod(path, 0666)
+ os.chmod(path, 0o666)
def _copy_file(self, src_path, dest_path):
self._execute('dd', 'if=%s' % src_path, 'of=%s' % dest_path,