summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamian Johnson <atagar@torproject.org>2017-08-15 13:13:15 -0700
committerDamian Johnson <atagar@torproject.org>2017-08-15 13:13:15 -0700
commit30990ab8b6374ce2a52a60e7345f96aaebd74263 (patch)
treeeec757e57ccb20bed8931fd175bd53a06030e802
parentf2305304084c62016b030064b97e43388d5af57a (diff)
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.
-rw-r--r--test/unit/descriptor/networkstatus/document_v3.py11
1 files changed, 11 insertions, 0 deletions
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: