Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thomas Leymonerie
slapos.toolbox
Commits
aa31063b
Commit
aa31063b
authored
Aug 18, 2017
by
Hardik Juneja
Committed by
Rafael Monnerat
Aug 18, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix apachedex test as per new changes
/reviewed-on
nexedi/slapos.toolbox!15
parent
27d017eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
slapos/test/test_apachedex.py
slapos/test/test_apachedex.py
+6
-7
No files found.
slapos/test/test_apachedex.py
View file @
aa31063b
...
@@ -33,7 +33,7 @@ from datetime import date
...
@@ -33,7 +33,7 @@ from datetime import date
from
slapos.apachedex
import
build_command
from
slapos.apachedex
import
build_command
class
Test
GenerateFee
d
(
unittest
.
TestCase
):
class
Test
ApachedexComman
d
(
unittest
.
TestCase
):
def
setUp
(
self
):
def
setUp
(
self
):
self
.
apachedex
=
"/bin/apachedex"
self
.
apachedex
=
"/bin/apachedex"
self
.
today
=
date
.
today
().
strftime
(
"%Y-%m-%d"
)
self
.
today
=
date
.
today
().
strftime
(
"%Y-%m-%d"
)
...
@@ -44,8 +44,8 @@ class TestGenerateFeed(unittest.TestCase):
...
@@ -44,8 +44,8 @@ class TestGenerateFeed(unittest.TestCase):
command
=
build_command
(
self
.
apachedex
,
command
=
build_command
(
self
.
apachedex
,
'foo.html'
,
'foo.html'
,
"foo"
,
[
self
.
acesslog1
,
self
.
acesslog2
]
,
[
self
.
acesslog1
,
self
.
acesslog2
]
)
'--default foo'
)
self
.
assertEqual
(
command
,
[
'/bin/apachedex'
,
self
.
assertEqual
(
command
,
[
'/bin/apachedex'
,
'--js-embed'
,
'--js-embed'
,
'--out'
,
'foo.html'
,
'--out'
,
'foo.html'
,
...
@@ -55,17 +55,16 @@ class TestGenerateFeed(unittest.TestCase):
...
@@ -55,17 +55,16 @@ class TestGenerateFeed(unittest.TestCase):
def
test_complexCommand
(
self
):
def
test_complexCommand
(
self
):
command
=
build_command
(
self
.
apachedex
,
command
=
build_command
(
self
.
apachedex
,
'bar.html'
,
'bar.html'
,
'default1'
,
[
self
.
acesslog1
,
self
.
acesslog2
],
[
self
.
acesslog1
,
self
.
acesslog2
],
[
'bar'
,
'foo'
]
)
'--base bar foo --default foo'
)
self
.
assertEqual
(
command
,
[
'/bin/apachedex'
,
self
.
assertEqual
(
command
,
[
'/bin/apachedex'
,
'--js-embed'
,
'--js-embed'
,
'--out'
,
'bar.html'
,
'--out'
,
'bar.html'
,
'--default'
,
'default1'
,
'--base'
,
'bar'
,
'foo'
,
'--base'
,
'bar'
,
'foo'
,
'--default'
,
'foo'
,
'--error-detail'
,
self
.
acesslog1
,
self
.
acesslog2
])
'--error-detail'
,
self
.
acesslog1
,
self
.
acesslog2
])
def
test_raiseErro
(
self
):
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__'
:
if
__name__
==
'__main__'
:
unittest
.
main
()
unittest
.
main
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment