Skip to content
Snippets Groups Projects
Commit 30990ab8 authored by Damian Johnson's avatar Damian Johnson
Browse files

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