Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
John Doe committed Jul 28, 2023
1 parent fd5e166 commit 964d10f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
5 changes: 3 additions & 2 deletions src/core/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,19 @@
Development Team: Brain Storm Team
"""
fVersion = open('VERSION', 'r+').readline().rstrip()

CoreConfig = {
'info': {
'name': 'Opendoor scanner',
'repository': '[email protected]:stanislav-web/OpenDoor.git',
'remote_version': 'https://raw.githubusercontent.com/stanislav-web/OpenDoor/master/VERSION',
'license': 'License: GNU General Public License',
'version': '4.0.6',
'version': fVersion,
'documentation': 'https://opendoor.readthedocs.org',
'required_versions': {
'minor': '3.7',
'major': '3.10'
'major': '3.11'
},
},
'data': {
Expand Down
16 changes: 8 additions & 8 deletions src/core/http/providers/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ def add_header(self, key, value):
:param str value: header value
:return: HeaderProvider
"""
self.__headers.add(key.strip(), value.strip())

self.__headers.update({key.strip(): value.strip()})
return self

@property
Expand All @@ -60,12 +60,12 @@ def _headers(self):

origin = ''.join([self.__cfg.scheme, self.__cfg.host])
referer = ''.join([self.__cfg.scheme, self.__cfg.host]) + ':' + str(self.__cfg.port)
self.add_header('Accept', self._accept)\
.add_header('Accept-Encoding', self._accept_encoding)\
self.add_header('Accept', self._accept) \
.add_header('Accept-Encoding', self._accept_encoding) \
.add_header('Accept-Language', self._accept_language) \
.add_header('Origin', origin)\
.add_header('Referer', referer)\
.add_header('Cache-Control', self._cache_control)\
.add_header('Upgrade-Insecure-Requests', '1')\
.add_header('Origin', origin) \
.add_header('Referer', referer) \
.add_header('Cache-Control', self._cache_control) \
.add_header('Upgrade-Insecure-Requests', '1') \
.add_header('Pragma', 'no-cache')
return self.__headers
2 changes: 1 addition & 1 deletion tests/test_lib_browser_debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def test_debug_list(self):
def test_debug_connection_pool(self):
""" Debug.debug_connection_pool() test """

self.assertTrue(self.debug.debug_connection_pool('http_pool_start', ''))
self.assertTrue(self.debug.debug_connection_pool('http_pool_start', '', ''))

def test_debug_proxy_pool(self):
""" Debug.debug_proxy_pool() test """
Expand Down

0 comments on commit 964d10f

Please sign in to comment.