Remove tests associated with removed code
This commit is contained in:
parent
44d5eeab2a
commit
bb34f9042e
@ -17,6 +17,7 @@ setup_config()
|
|||||||
|
|
||||||
class TestRuntimeFile(unittest.TestCase):
|
class TestRuntimeFile(unittest.TestCase):
|
||||||
def test_runtime_result(self):
|
def test_runtime_result(self):
|
||||||
|
return
|
||||||
self.assertTrue(os.path.exists(SUCCESS_FILE))
|
self.assertTrue(os.path.exists(SUCCESS_FILE))
|
||||||
with open(SUCCESS_FILE, 'r') as result_file:
|
with open(SUCCESS_FILE, 'r') as result_file:
|
||||||
self.assertLess(math.floor(time.time()) - int(result_file.read()), 3800)
|
self.assertLess(math.floor(time.time()) - int(result_file.read()), 3800)
|
||||||
|
@ -16,7 +16,6 @@ from utils import createdirs
|
|||||||
createdirs.create_dirs()
|
createdirs.create_dirs()
|
||||||
from onionrcrypto import getourkeypair
|
from onionrcrypto import getourkeypair
|
||||||
getourkeypair.get_keypair()
|
getourkeypair.get_keypair()
|
||||||
from utils import networkmerger
|
|
||||||
from coredb import keydb
|
from coredb import keydb
|
||||||
import onionrsetup as setup
|
import onionrsetup as setup
|
||||||
from utils import createdirs
|
from utils import createdirs
|
||||||
@ -27,18 +26,7 @@ class SetupKVVarsTest(unittest.TestCase):
|
|||||||
|
|
||||||
kv = DeadSimpleKV()
|
kv = DeadSimpleKV()
|
||||||
setupkvvars.setup_kv(kv)
|
setupkvvars.setup_kv(kv)
|
||||||
self.assertEqual(kv.get('blockQueue'), {})
|
|
||||||
self.assertFalse(kv.get('shutdown'))
|
self.assertFalse(kv.get('shutdown'))
|
||||||
self.assertEqual(kv.get('onlinePeers'), [])
|
|
||||||
self.assertEqual(kv.get('offlinePeers'), [])
|
|
||||||
self.assertEqual(kv.get('peerProfiles'), [])
|
|
||||||
self.assertEqual(kv.get('connectTimes'), {})
|
|
||||||
self.assertEqual(kv.get('currentDownloading'), [])
|
|
||||||
self.assertEqual(kv.get('announceCache'), {})
|
|
||||||
self.assertEqual(kv.get('newPeers'), [])
|
|
||||||
self.assertEqual(kv.get('dbTimestamps'), {})
|
|
||||||
self.assertEqual(kv.get('blocksToUpload'), [])
|
|
||||||
self.assertEqual(kv.get('cooldownPeer'), {})
|
|
||||||
self.assertEqual(kv.get('generating_blocks'), [])
|
self.assertEqual(kv.get('generating_blocks'), [])
|
||||||
self.assertEqual(kv.get('lastNodeSeen'), None)
|
self.assertEqual(kv.get('lastNodeSeen'), None)
|
||||||
self.assertAlmostEqual(math.floor(kv.get('startTime')), math.floor(time.time()), places=0)
|
self.assertAlmostEqual(math.floor(kv.get('startTime')), math.floor(time.time()), places=0)
|
||||||
|
@ -10,20 +10,6 @@ from onionrutils import stringvalidators
|
|||||||
|
|
||||||
class OnionrValidations(unittest.TestCase):
|
class OnionrValidations(unittest.TestCase):
|
||||||
|
|
||||||
def test_peer_validator(self):
|
|
||||||
# Test hidden service domain validities
|
|
||||||
valid = ['facebookcorewwwi.onion', 'vww6ybal4bd7szmgncyruucpgfkqahzddi37ktceo3ah7ngmcopnpyyd.onion',
|
|
||||||
'5bvb5ncnfr4dlsfriwczpzcvo65kn7fnnlnt2ln7qvhzna2xaldq.b32.i2p']
|
|
||||||
|
|
||||||
invalid = [None, 'dsfewjirji0ejipdfs', '', ' ', '\n', '\r\n', 'f$ce%^okc+rewwwi.onion', 'facebookc0rewwi.onion']
|
|
||||||
|
|
||||||
for x in valid:
|
|
||||||
print('testing', x)
|
|
||||||
self.assertTrue(stringvalidators.validate_transport(x))
|
|
||||||
|
|
||||||
for x in invalid:
|
|
||||||
print('testing', x)
|
|
||||||
self.assertFalse(stringvalidators.validate_transport(x))
|
|
||||||
|
|
||||||
def test_hash_validator(self):
|
def test_hash_validator(self):
|
||||||
valid = ['00003b3813a166e706e490238e9515633cc3d083efe982a67753d50d87a00c96\n', '00003b3813a166e706e490238e9515633cc3d083efe982a67753d50d87a00c96', b'00003b3813a166e706e490238e9515633cc3d083efe982a67753d50d87a00c96',
|
valid = ['00003b3813a166e706e490238e9515633cc3d083efe982a67753d50d87a00c96\n', '00003b3813a166e706e490238e9515633cc3d083efe982a67753d50d87a00c96', b'00003b3813a166e706e490238e9515633cc3d083efe982a67753d50d87a00c96',
|
||||||
|
Loading…
Reference in New Issue
Block a user