Add __eq__ and __repr__ for PACFetcher

This makes it possible to use it in comparisons during tests easily.
This commit is contained in:
Florian Bruhin 2017-06-14 18:13:54 +02:00
parent cc90cc6843
commit d751539a25

View File

@ -252,6 +252,12 @@ class PACFetcher(QObject):
self._pac = None
self._error_message = None
def __eq__(self, other):
return self._pac_url == other._pac_url
def __repr__(self):
return utils.get_repr(self, url=self._pac_url, constructor=True)
@pyqtSlot()
def _finish(self):
if self._reply.error() != QNetworkReply.NoError: