diff --git a/bindings/python/src/alert.cpp b/bindings/python/src/alert.cpp index c53c6b8bd..8a0dd0aa6 100644 --- a/bindings/python/src/alert.cpp +++ b/bindings/python/src/alert.cpp @@ -235,6 +235,7 @@ void bind_alert() class_, noncopyable>( "torrent_alert", no_init) .add_property("handle", make_getter(&torrent_alert::handle, by_value())) + .add_property("torrent_name", &torrent_alert::torrent_name) ; class_, noncopyable>( diff --git a/bindings/python/test.py b/bindings/python/test.py index 7afeaa830..13348db0d 100644 --- a/bindings/python/test.py +++ b/bindings/python/test.py @@ -231,6 +231,8 @@ class test_alerts(unittest.TestCase): ses.wait_for_alert(1000) # milliseconds alerts = ses.pop_alerts() for a in alerts: + if a.what() == 'add_torrent_alert': + self.assertEquals(a.torrent_name, 'temp') print(a.message()) for field_name in dir(a): if field_name.startswith('__'): continue