speed up tests by lowering pow in their configs
parent
7820c87b79
commit
2a6f6bb1aa
|
@ -24,10 +24,6 @@ class TestBigBrother(unittest.TestCase):
|
||||||
requests.get('https://example.com')
|
requests.get('https://example.com')
|
||||||
with self.assertRaises(onionrexceptions.NetworkLeak):
|
with self.assertRaises(onionrexceptions.NetworkLeak):
|
||||||
requests.get('https://1.1.1.1/')
|
requests.get('https://1.1.1.1/')
|
||||||
try:
|
|
||||||
requests.get('http://192.168.1.1/')
|
|
||||||
except requests.exceptions.ConnectionError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|
|
@ -9,11 +9,18 @@ os.environ["ONIONR_HOME"] = TEST_DIR
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from utils import identifyhome, createdirs, bettersleep
|
from utils import identifyhome, createdirs, bettersleep
|
||||||
from onionrsetup import setup_config
|
from onionrsetup import setup_config, setup_default_plugins
|
||||||
from onionrblocks import BlockList, insert
|
|
||||||
|
|
||||||
createdirs.create_dirs()
|
createdirs.create_dirs()
|
||||||
setup_config()
|
setup_config()
|
||||||
|
setup_config()
|
||||||
|
setup_default_plugins()
|
||||||
|
|
||||||
|
import config
|
||||||
|
config.set("general.minimum_block_pow", 2)
|
||||||
|
config.set('general.minimum_send_pow', 2)
|
||||||
|
config.save()
|
||||||
|
from onionrblocks import BlockList, insert
|
||||||
|
|
||||||
|
|
||||||
class TestBlockList(unittest.TestCase):
|
class TestBlockList(unittest.TestCase):
|
||||||
|
|
|
@ -11,12 +11,21 @@ from utils import createdirs
|
||||||
createdirs.create_dirs()
|
createdirs.create_dirs()
|
||||||
|
|
||||||
|
|
||||||
import onionrblocks
|
|
||||||
import onionrstorage
|
import onionrstorage
|
||||||
from onionrutils import bytesconverter
|
from onionrutils import bytesconverter
|
||||||
import onionrcrypto
|
import onionrcrypto
|
||||||
from onionrblocks import onionrblockapi
|
from onionrblocks import onionrblockapi
|
||||||
|
|
||||||
|
from onionrsetup import setup_config, setup_default_plugins
|
||||||
|
|
||||||
|
setup_config()
|
||||||
|
setup_default_plugins()
|
||||||
|
|
||||||
|
import config
|
||||||
|
config.set("general.minimum_block_pow", 2)
|
||||||
|
config.set('general.minimum_send_pow', 2)
|
||||||
|
config.save()
|
||||||
|
import onionrblocks
|
||||||
|
|
||||||
class OnionrBlockTests(unittest.TestCase):
|
class OnionrBlockTests(unittest.TestCase):
|
||||||
def test_plaintext_insert(self):
|
def test_plaintext_insert(self):
|
||||||
|
|
|
@ -13,9 +13,20 @@ getourkeypair.get_keypair()
|
||||||
import config
|
import config
|
||||||
import logger
|
import logger
|
||||||
import onionrsetup as setup
|
import onionrsetup as setup
|
||||||
import onionrblocks
|
|
||||||
import filepaths
|
import filepaths
|
||||||
import onionrexceptions
|
import onionrexceptions
|
||||||
|
|
||||||
|
from onionrsetup import setup_config, setup_default_plugins
|
||||||
|
|
||||||
|
setup_config()
|
||||||
|
setup_default_plugins()
|
||||||
|
|
||||||
|
import config
|
||||||
|
config.set("general.minimum_block_pow", 2)
|
||||||
|
config.set('general.minimum_send_pow', 2)
|
||||||
|
config.save()
|
||||||
|
import onionrblocks
|
||||||
|
|
||||||
from onionrblocks import storagecounter
|
from onionrblocks import storagecounter
|
||||||
import onionrstorage
|
import onionrstorage
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,11 @@ from onionrsetup import setup_config, setup_default_plugins
|
||||||
setup_config()
|
setup_config()
|
||||||
setup_default_plugins()
|
setup_default_plugins()
|
||||||
|
|
||||||
|
import config
|
||||||
|
config.set("general.minimum_block_pow", 2)
|
||||||
|
config.set('general.minimum_send_pow', 2)
|
||||||
|
config.save()
|
||||||
|
|
||||||
class TestTimeInsert(unittest.TestCase):
|
class TestTimeInsert(unittest.TestCase):
|
||||||
def test_time_insert_none(self):
|
def test_time_insert_none(self):
|
||||||
bl = time_insert('test')
|
bl = time_insert('test')
|
||||||
|
|
Loading…
Reference in New Issue