Commit aa31063b authored by Hardik Juneja's avatar Hardik Juneja Committed by Rafael Monnerat

Fix apachedex test as per new changes

/reviewed-on nexedi/slapos.toolbox!15
parent 27d017eb
......@@ -33,7 +33,7 @@ from datetime import date
from slapos.apachedex import build_command
class TestGenerateFeed(unittest.TestCase):
class TestApachedexCommand(unittest.TestCase):
def setUp(self):
self.apachedex = "/bin/apachedex"
self.today = date.today().strftime("%Y-%m-%d")
......@@ -44,8 +44,8 @@ class TestGenerateFeed(unittest.TestCase):
command = build_command(self.apachedex,
'foo.html',
"foo",
[self.acesslog1, self.acesslog2])
[self.acesslog1, self.acesslog2],
'--default foo')
self.assertEqual(command, ['/bin/apachedex',
'--js-embed',
'--out', 'foo.html',
......@@ -55,17 +55,16 @@ class TestGenerateFeed(unittest.TestCase):
def test_complexCommand(self):
command = build_command(self.apachedex,
'bar.html',
'default1',
[self.acesslog1, self.acesslog2],
['bar', 'foo'])
'--base bar foo --default foo')
self.assertEqual(command, ['/bin/apachedex',
'--js-embed',
'--out', 'bar.html',
'--default', 'default1',
'--base', 'bar', 'foo',
'--default', 'foo',
'--error-detail', self.acesslog1, self.acesslog2 ])
def test_raiseErro(self):
self.assertRaises(ValueError, build_command, self.apachedex, 'foo.html', None, [])
self.assertRaises(ValueError, build_command, self.apachedex, 'foo.html', [])
if __name__ == '__main__':
unittest.main()
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