Add __eq__ and __repr__ for PACFetcher
This makes it possible to use it in comparisons during tests easily.
This commit is contained in:
parent
cc90cc6843
commit
d751539a25
@ -252,6 +252,12 @@ class PACFetcher(QObject):
|
|||||||
self._pac = None
|
self._pac = None
|
||||||
self._error_message = 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()
|
@pyqtSlot()
|
||||||
def _finish(self):
|
def _finish(self):
|
||||||
if self._reply.error() != QNetworkReply.NoError:
|
if self._reply.error() != QNetworkReply.NoError:
|
||||||
|
Loading…
Reference in New Issue
Block a user