Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
juga
sbws
Commits
75a6650d
Commit
75a6650d
authored
Nov 20, 2018
by
juga
Browse files
tests: scale lines using torflow's method
parent
95da3f93
Changes
1
Show whitespace changes
Inline
Side-by-side
tests/unit/lib/test_v3bwfile.py
View file @
75a6650d
...
...
@@ -227,9 +227,10 @@ def test_from_results_read(datadir, tmpdir, conf, args):
expected_header
=
V3BWHeader
(
timestamp_l
,
earliest_bandwidth
=
earliest_bandwidth
,
latest_bandwidth
=
latest_bandwidth
)
expected_bwls
=
[
V3BWLine
.
from_results
(
results
[
fp
])
for
fp
in
results
]
# bw store now B, not KB
expected_bwls
[
0
].
bw
=
round
(
expected_bwls
[
0
].
bw
/
1000
)
raw_bwls
=
[
V3BWLine
.
from_results
(
results
[
fp
])
for
fp
in
results
]
# Scale BWLines using torflow method, since it's the default and BWLines
# bandwidth is the raw bandwidth.
expected_bwls
=
V3BWFile
.
bw_torflow_scale
(
raw_bwls
)
expected_f
=
V3BWFile
(
expected_header
,
expected_bwls
)
# This way is going to convert bw to KB
v3bwfile
=
V3BWFile
.
from_results
(
results
)
...
...
Write
Preview
Supports
Markdown
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