[tor-commits] [stem/master] Add unit test for data causing issues for BridgeDB
atagar at torproject.org
atagar at torproject.org
Tue Aug 15 20:14:27 UTC 2017
commit 30990ab8b6374ce2a52a60e7345f96aaebd74263
Author: Damian Johnson <atagar at torproject.org>
Date: Tue Aug 15 13:13:15 2017 -0700
Add unit test for data causing issues for BridgeDB
Huh. Became curious if the data causing BridgeDB to be sad was coming from
us...
https://trac.torproject.org/projects/tor/ticket/23251
Looks to work just fine.
---
test/unit/descriptor/networkstatus/document_v3.py | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/test/unit/descriptor/networkstatus/document_v3.py b/test/unit/descriptor/networkstatus/document_v3.py
index 8c662a3e..a99d76be 100644
--- a/test/unit/descriptor/networkstatus/document_v3.py
+++ b/test/unit/descriptor/networkstatus/document_v3.py
@@ -786,6 +786,17 @@ DnN5aFtYKiTc19qIC7Nmo+afPdDEf0MlJvEOP5EWl3w=
('fast-speed=40960', {str_type('fast-speed'): 40960}), # numeric value
('guard-wfu=94.669%', {str_type('guard-wfu'): 0.94669}), # percentage value
('guard-wfu=94.669% guard-tk=691200', {str_type('guard-wfu'): 0.94669, str_type('guard-tk'): 691200}), # multiple values
+ ('stable-uptime=0 stable-mtbf=0 fast-speed=0 guard-wfu=0.000% guard-tk=0 guard-bw-inc-exits=0 guard-bw-exc-exits=0 enough-mtbf=1 ignoring-advertised-bws=0', {
+ str_type('stable-uptime'): 0,
+ str_type('stable-mtbf'): 0,
+ str_type('fast-speed'): 0,
+ str_type('guard-wfu'): 0.0,
+ str_type('guard-tk'): 0,
+ str_type('guard-bw-inc-exits'): 0,
+ str_type('guard-bw-exc-exits'): 0,
+ str_type('enough-mtbf'): 1,
+ str_type('ignoring-advertised-bws'): 0,
+ }),
)
for test_value, expected_value in test_values:
More information about the tor-commits
mailing list