Commit 7f45fa10 authored by Jérome Perrin's avatar Jérome Perrin

tests: fix some trailing whitespaces and inconsistent indentations

parent 55ff948c
......@@ -31,7 +31,7 @@ import shutil
import tempfile
import slapos.slap
import slapos.cli.configure_local
from slapos.cli.configure_local import ConfigureLocalCommand, _createConfigurationDirectory
from slapos.cli.configure_local import ConfigureLocalCommand, _createConfigurationDirectory
from slapos.cli.entry import SlapOSApp
from argparse import Namespace
from six.moves.configparser import ConfigParser
......
......@@ -208,7 +208,7 @@ class RunPromise(GenericPromise):
"title": "%(name)s"
}]
}"""
history_file = os.path.join(self.partition_dir, PROMISE_HISTORY_RESULT_FOLDER_NAME, '%s.history.json' % name)
self.assertTrue(os.path.exists(history_file))
with open(history_file) as f:
......@@ -411,7 +411,7 @@ class RunPromise(GenericPromise):
self.launcher.run()
self.assertTrue(os.path.exists(state_folder))
self.assertTrue(os.path.exists(os.path.join(self.log_dir, 'my_promise.log')))
self.assertSuccessResult("my_promise")
self.assertSuccessHistoryResult("my_promise")
self.assertSuccessStatsResult(1)
......@@ -1577,10 +1577,10 @@ class TestSlapOSGenericPromise(TestSlapOSPromiseMixin):
def test_promise_cleanup_plugin_dir(self):
stale_pyc = os.path.join(self.plugin_dir, 'stale.pyc')
with open(stale_pyc, 'w') as fh:
fh.write('')
fh.write('')
stale_pyo = os.path.join(self.plugin_dir, 'stale.pyo')
with open(stale_pyo, 'w') as fh:
fh.write('')
fh.write('')
self.initialisePromise()
self.launcher.run()
self.assertFalse(os.path.exists(stale_pyc))
......@@ -2021,4 +2021,3 @@ class RunPromise(GenericPromise):
if __name__ == '__main__':
unittest.main()
......@@ -40,18 +40,13 @@ class TestRegister(unittest.TestCase):
template = slapos.cli.register.fetch_configuration_template()
self.assertNotEqual("", template)
for entry in ['computer_id',
for entry in ['computer_id',
'master_url',
'key_file',
'key_file',
'cert_file',
'certificate_repository_path',
'interface_name',
'interface_name',
'ipv4_local_network',
'partition_amount',
'partition_amount',
'create_tap']:
self.assertTrue(entry in template, "%s is not in template (%s)" % (entry, template))
......@@ -1471,7 +1471,7 @@ class TestOpenOrder(SlapMixin):
},
"text_content": {
"title": "Parameter XML",
"default": dict2xml({'_':json.dumps(parameter_dict)}),
"default": dict2xml({'_': json.dumps(parameter_dict)}),
"key": "field_my_text_content",
"type": "TextAreaField"
},
......@@ -1689,4 +1689,3 @@ class TestSoftwareProductCollection(SlapMixin):
self.product_collection.get
)
self.assertEqual(self.product_collection.foo, '0')
......@@ -993,4 +993,4 @@ class TestFormatConfig(SlapformatMixin):
# TODO add more tests with config file
if __name__ == '__main__':
unittest.main()
unittest.main()
This diff is collapsed.
This diff is collapsed.
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