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')
|
||||
with self.assertRaises(onionrexceptions.NetworkLeak):
|
||||
requests.get('https://1.1.1.1/')
|
||||
try:
|
||||
requests.get('http://192.168.1.1/')
|
||||
except requests.exceptions.ConnectionError:
|
||||
pass
|
||||
|
||||
|
||||
unittest.main()
|
||||
|
|
|
@ -9,11 +9,18 @@ os.environ["ONIONR_HOME"] = TEST_DIR
|
|||
import unittest
|
||||
|
||||
from utils import identifyhome, createdirs, bettersleep
|
||||
from onionrsetup import setup_config
|
||||
from onionrblocks import BlockList, insert
|
||||
from onionrsetup import setup_config, setup_default_plugins
|
||||
|
||||
createdirs.create_dirs()
|
||||
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):
|
||||
|
|
|
@ -11,12 +11,21 @@ from utils import createdirs
|
|||
createdirs.create_dirs()
|
||||
|
||||
|
||||
import onionrblocks
|
||||
import onionrstorage
|
||||
from onionrutils import bytesconverter
|
||||
import onionrcrypto
|
||||
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):
|
||||
def test_plaintext_insert(self):
|
||||
|
|
|
@ -13,9 +13,20 @@ getourkeypair.get_keypair()
|
|||
import config
|
||||
import logger
|
||||
import onionrsetup as setup
|
||||
import onionrblocks
|
||||
import filepaths
|
||||
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
|
||||
import onionrstorage
|
||||
|
||||
|
|
|
@ -17,6 +17,11 @@ 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()
|
||||
|
||||
class TestTimeInsert(unittest.TestCase):
|
||||
def test_time_insert_none(self):
|
||||
bl = time_insert('test')
|
||||
|
|
Loading…
Reference in New Issue