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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
slapos.toolbox
Commits
40d4407c
Commit
40d4407c
authored
Nov 27, 2021
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: replace unused variables by equivalent assertions
parent
dea18597
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
slapos/test/monitor/testrunpromise.py
slapos/test/monitor/testrunpromise.py
+3
-3
No files found.
slapos/test/monitor/testrunpromise.py
View file @
40d4407c
...
...
@@ -292,7 +292,7 @@ class RunPromise(GenericPromise):
self
.
assertTrue
(
os
.
path
.
exists
(
result_file
))
with
open
(
result_file
)
as
f
:
result1
=
json
.
load
(
f
)
s
tart_date
=
datetime
.
strptime
(
result1
[
'result'
].
pop
(
'date'
),
'%Y-%m-%dT%H:%M:%S+0000'
)
s
elf
.
assertTrue
(
datetime
.
strptime
(
result1
[
'result'
].
pop
(
'date'
),
'%Y-%m-%dT%H:%M:%S+0000'
)
)
expected_result
=
{
u'title'
:
u'promise_1'
,
u'name'
:
u'promise_1'
,
...
...
@@ -308,7 +308,7 @@ class RunPromise(GenericPromise):
promise_runner
.
start
()
with
open
(
result_file
)
as
f
:
result2
=
json
.
load
(
f
)
s
tart_date2
=
datetime
.
strptime
(
result2
[
'result'
].
pop
(
'date'
),
'%Y-%m-%dT%H:%M:%S+0000'
)
s
elf
.
assertTrue
(
datetime
.
strptime
(
result2
[
'result'
].
pop
(
'date'
),
'%Y-%m-%dT%H:%M:%S+0000'
)
)
self
.
assertTrue
(
result2
.
pop
(
'execution-time'
))
self
.
assertEqual
(
expected_result
,
result2
)
...
...
@@ -340,7 +340,7 @@ class RunPromise(GenericPromise):
with
open
(
result2_file
)
as
f
:
result2
=
json
.
load
(
f
)
s
tart_date2
=
datetime
.
strptime
(
result2
[
'result'
].
pop
(
'date'
),
'%Y-%m-%dT%H:%M:%S+0000'
)
s
elf
.
assertTrue
(
datetime
.
strptime
(
result2
[
'result'
].
pop
(
'date'
),
'%Y-%m-%dT%H:%M:%S+0000'
)
)
expected_result
=
{
u'title'
:
u'promise_2'
,
u'name'
:
u'promise_2'
,
...
...
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