Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Menu
Open sidebar
NTPsec
ntpsec
Commits
fc2b31ee
Commit
fc2b31ee
authored
Jan 12, 2018
by
Ian Bruene
Browse files
Fixed test error on python3.
parent
79f95763
Pipeline
#16104182
passed with stages
in 12 minutes and 16 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tests/pylib/test_agentx.py
View file @
fc2b31ee
...
...
@@ -2211,21 +2211,21 @@ class TestNtpclientsNtpsnmpd(unittest.TestCase):
[
vb
(
a
.
VALUE_INTEGER
,
(
1
,
2
),
1
),
vb
(
a
.
VALUE_INTEGER
,
(
3
,
4
),
2
)])
self
.
assertEqual
(
big
,
b
"
\x00\x02\x00\x00
"
"
\x02\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x02
"
"
\x00\x00\x00\x01
"
"
\x00\x02\x00\x00
"
"
\x02\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x04
"
"
\x00\x00\x00\x02
"
)
b
"
\x02\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x02
"
b
"
\x00\x00\x00\x01
"
b
"
\x00\x02\x00\x00
"
b
"
\x02\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x04
"
b
"
\x00\x00\x00\x02
"
)
# Test encode little endian
little
=
enc
(
False
,
[
vb
(
a
.
VALUE_INTEGER
,
(
1
,
2
),
1
),
vb
(
a
.
VALUE_INTEGER
,
(
3
,
4
),
2
)])
self
.
assertEqual
(
little
,
b
"
\x02\x00\x00\x00
"
"
\x02\x00\x00\x00\x01\x00\x00\x00\x02\x00\x00\x00
"
"
\x01\x00\x00\x00
"
"
\x02\x00\x00\x00
"
"
\x02\x00\x00\x00\x03\x00\x00\x00\x04\x00\x00\x00
"
"
\x02\x00\x00\x00
"
)
b
"
\x02\x00\x00\x00\x01\x00\x00\x00\x02\x00\x00\x00
"
b
"
\x01\x00\x00\x00
"
b
"
\x02\x00\x00\x00
"
b
"
\x02\x00\x00\x00\x03\x00\x00\x00\x04\x00\x00\x00
"
b
"
\x02\x00\x00\x00
"
)
# Test decode empty
self
.
assertEqual
(
dec
(
b
""
,
standardFlags
),
None
)
# Test decode big endian
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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