Commit b97cb913 authored by Bryton Lacquement's avatar Bryton Lacquement 🚪

Clean up

parent ae4f2a25
......@@ -31,7 +31,7 @@ def moduleIsModifiedSince(top, since, followlinks=False):
if ext in ignored_extension_set:
continue
if since < os.stat(os.path.join(root, name)).st_mtime:
print("%s was modified since the process started." % \
print("%s was modified since the process started." %
os.path.join(root, name))
print("Process Time %s < Last modidified file %s" % (time.ctime(since),
time.ctime(os.stat(os.path.join(root, name)).st_mtime)))
......
......@@ -675,10 +675,8 @@ def fileBrowser():
dir = request.form['dir'].encode('utf-8')
newfilename = request.form.get('newfilename', '').encode('utf-8')
files = request.form.get('files', '').encode('utf-8')
if 'opt' not in request.form or not request.form['opt']:
opt = 1
else:
opt = int(request.form['opt'])
opt = request.form.get('opt')
opt = int(opt) if opt else 1
else:
opt = int(request.args.get('opt'))
......
......@@ -229,7 +229,7 @@ exit %(code)s
}"""
with open(os.path.join(self.private_dir, 'monitor.global.json')) as r:
result = json.loads(r.read())
result = json.load(r)
result.pop("date")
self.assertEqual(result,
json.loads(expected_result))
......@@ -247,7 +247,7 @@ exit %(code)s
expected_result_dict["state"] = {'error': 0, 'success': 4}
instance_result_dict = None
with open(os.path.join(self.private_dir, 'monitor.global.json')) as r:
instance_result_dict = json.loads(r.read())
instance_result_dict = json.load(r)
result = instance_result_dict.copy()
result.pop("date")
self.assertEqual(result,
......
......@@ -3,7 +3,6 @@ import os
import string
import random
import supervisor
from six.moves import _thread
import unittest
......@@ -29,14 +28,6 @@ class TestRunnerBackEnd(unittest.TestCase):
if os.path.exists(garbage_file):
os.remove(garbage_file)
def _startSupervisord(self):
cwd = os.getcwd()
supervisord_config_file = os.path.join(cwd, 'supervisord.conf')
open(supervisord_config_file, 'w').write("""
""")
supervisord = supervisor.supervisord.Supervisord('-c', supervisord_config_file)
_thread.start_new_thread()
def test_UserCanLoginAndUpdateCredentials(self):
"""
* Create a user with createNewUser
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment