[tor-commits] [sbws/maint-1.1] chg: tests: Remove `_count` from attr

juga at torproject.org juga at torproject.org
Tue Apr 14 13:53:19 UTC 2020


commit 035d325ca776178757c5206e62c5ecca47c7e662
Author: juga0 <juga at riseup.net>
Date:   Sat Mar 21 15:04:42 2020 +0000

    chg: tests: Remove `_count` from attr
---
 tests/unit/conftest.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/tests/unit/conftest.py b/tests/unit/conftest.py
index bc812f0..a74d03e 100644
--- a/tests/unit/conftest.py
+++ b/tests/unit/conftest.py
@@ -68,11 +68,15 @@ OBS_BW = 524288
 BW = 600000
 UNMEASURED = False
 
+now = datetime.utcnow()
+
 RELAY1 = Result.Relay(FP1, NICK1, IP1, ED25519,
                       average_bandwidth=AVG_BW, burst_bandwidth=BUR_BW,
                       observed_bandwidth=OBS_BW, consensus_bandwidth=BW,
                       consensus_bandwidth_is_unmeasured=UNMEASURED,
-                      relay_in_recent_consensus_count=2)
+                      relay_in_recent_consensus=[now],
+                      relay_recent_measurement_attempt=[now],
+                      relay_recent_priority_list=[now])
 RELAY2 = Result.Relay(FP2, NICK2, IP2, ED25519)
 
 RESULT = Result(RELAY1, CIRC12, DEST_URL, SCANNER, t=TIME1)
@@ -96,7 +100,9 @@ RELAY_DICT = {
     "relay_observed_bandwidth": OBS_BW,
     "consensus_bandwidth": BW,
     "consensus_bandwidth_is_unmeasured": UNMEASURED,
-    "relay_in_recent_consensus_count": 2,
+    "relay_in_recent_consensus": [now],
+    "relay_recent_measurement_attempt": [now],
+    "relay_recent_priority_list": [now],
 }
 
 BASE_RESULT_NO_RELAY_DICT = {





More information about the tor-commits mailing list