commit c9e64eaebf7905c122a973032c9f7e3d01583bbb Author: Damian Johnson atagar@torproject.org Date: Sun Feb 9 18:54:12 2020 -0800
Rename NetworkStatusEvent desc attribute --- stem/response/events.py | 7 ++----- test/unit/response/events.py | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/stem/response/events.py b/stem/response/events.py index 9b8a5504..38708abc 100644 --- a/stem/response/events.py +++ b/stem/response/events.py @@ -704,7 +704,7 @@ class NetworkStatusEvent(Event):
The NS event was introduced in tor version 0.1.2.3-alpha.
- :var list desc: :class:`~stem.descriptor.router_status_entry.RouterStatusEntryV3` for the changed descriptors + :var list descriptors: :class:`~stem.descriptor.router_status_entry.RouterStatusEntryV3` for the changed descriptors """
_SKIP_PARSING = True @@ -713,10 +713,7 @@ class NetworkStatusEvent(Event): def _parse(self): content = str(self).lstrip('NS\n').rstrip('\nOK')
- # TODO: For stem 2.0.0 consider changing 'desc' to 'descriptors' to match - # our other events. - - self.desc = list(stem.descriptor.router_status_entry._parse_file( + self.descriptors = list(stem.descriptor.router_status_entry._parse_file( io.BytesIO(str_tools._to_bytes(content)), False, entry_class = stem.descriptor.router_status_entry.RouterStatusEntryV3, diff --git a/test/unit/response/events.py b/test/unit/response/events.py index ca8b3909..33557874 100644 --- a/test/unit/response/events.py +++ b/test/unit/response/events.py @@ -1036,7 +1036,7 @@ class TestEvents(unittest.TestCase): event = _get_event(NS_EVENT)
self.assertTrue(isinstance(event, stem.response.events.NetworkStatusEvent)) - self.assertEqual([expected_desc], event.desc) + self.assertEqual([expected_desc], event.descriptors)
def test_orconn_event(self): event = _get_event(ORCONN_CLOSED)
tor-commits@lists.torproject.org