Skip to content
This repository was archived by the owner on Mar 2, 2022. It is now read-only.

Commit 8c902e6

Browse files
committed
Add files and hashes for measurement test,
to match the dummy data received.
1 parent c661f8f commit 8c902e6

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

test/test_measurement.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ def render_GET(self, request):
2828
size = int(size[:-1])*(2**10)
2929
elif 'M' in size:
3030
size = int(size[:-1])*(2**20)
31+
# FIXME: to simplify test, return always same data no matter what the size is
32+
return 'a'
3133
return 'a'*size
3234

3335
self.port = yield available_tcp_port(reactor)
@@ -39,6 +41,15 @@ def test_scan_chutney(self):
3941
self.tmp = mkdtemp()
4042
scan = BwScan(self.tor_state, reactor, self.tmp)
4143
scan.baseurl = 'http://127.0.0.1:{}'.format(self.port)
44+
# FIXME: to simplify test, use same data and hash, no matter what the file size is
45+
scan.bw_files = {
46+
64*1024: ("64M", '86f7e437faa5a7fce15d1ddcb9eaeaea377667b8'),
47+
32*1024: ("32M", '86f7e437faa5a7fce15d1ddcb9eaeaea377667b8'),
48+
16*1024: ("16M", '86f7e437faa5a7fce15d1ddcb9eaeaea377667b8'),
49+
8*1024: ("8M", '86f7e437faa5a7fce15d1ddcb9eaeaea377667b8'),
50+
4*1024: ("4M", '86f7e437faa5a7fce15d1ddcb9eaeaea377667b8'),
51+
2*1024: ("2M", '86f7e437faa5a7fce15d1ddcb9eaeaea377667b8'),
52+
}
4253

4354
def check_all_routers_measured(measurement_dir):
4455
"""

0 commit comments

Comments
 (0)