Skip to content
Snippets Groups Projects
Commit 75a6650d authored by juga's avatar juga
Browse files

tests: scale lines using torflow's method

parent 95da3f93
Branches
Tags
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment