mirror of
https://github.com/onionshare/onionshare.git
synced 2024-10-01 01:35:40 -04:00
try and fix tests
This commit is contained in:
parent
d69e93a5ba
commit
796a4b3b5d
@ -414,13 +414,13 @@ class Onion(object):
|
||||
|
||||
self.service_id = res.content()[0][2].split('=')[1]
|
||||
onion_host = self.service_id + '.onion'
|
||||
private_key = res.private_key
|
||||
self.private_key = res.private_key
|
||||
|
||||
if self.stealth:
|
||||
auth_cookie = res.content()[2][2].split('=')[1].split(':')[1]
|
||||
self.auth_string = 'HidServAuth {} {}'.format(onion_host, auth_cookie)
|
||||
|
||||
return (onion_host, private_key)
|
||||
return onion_host
|
||||
|
||||
def cleanup(self):
|
||||
"""
|
||||
|
@ -76,7 +76,9 @@ class OnionShare(object):
|
||||
if self.shutdown_timeout > 0:
|
||||
self.shutdown_timer = common.close_after_seconds(self.shutdown_timeout)
|
||||
|
||||
self.onion_host, self.private_key = self.onion.start_onion_service(self.port)
|
||||
self.onion_host = self.onion.start_onion_service(self.port)
|
||||
|
||||
self.private_key = self.onion.private_key
|
||||
|
||||
if self.stealth:
|
||||
self.auth_string = self.onion.auth_string
|
||||
|
@ -27,6 +27,7 @@ from onionshare import OnionShare
|
||||
class MyOnion:
|
||||
def __init__(self, stealth=False):
|
||||
self.auth_string = 'TestHidServAuth'
|
||||
self.private_key = ''
|
||||
self.stealth = stealth
|
||||
|
||||
@staticmethod
|
||||
|
Loading…
Reference in New Issue
Block a user