Ejemplo n.º 1
0
 def test_perform_a_lookup(self):
     if not is_internet_connected():
         self.skipTest("You must be connected to the internet to run this test")
     dns_test = dnst.DNSTest()
     dns_test._setUp()
     result = yield dns_test.performALookup('example.com', dns_server=('8.8.8.8', 53))
     self.assertEqual(result, ['93.184.216.34'])
Ejemplo n.º 2
0
 def test_probe_ip(self):
     if not is_internet_connected():
         self.skipTest(
             "You must be connected to the internet to run this test")
     probe_ip = geoip.ProbeIP()
     res = yield probe_ip.lookup()
     assert len(res.split('.')) == 4
Ejemplo n.º 3
0
 def test_probe_ip(self):
     if not is_internet_connected():
         self.skipTest(
             "You must be connected to the internet to run this test"
         )
     probe_ip = geoip.ProbeIP()
     res = yield probe_ip.lookup()
     assert len(res.split('.')) == 4
Ejemplo n.º 4
0
 def setUp(self):
     if not is_internet_connected():
         self.skipTest("You must be connected to the internet to run this test")
     config.tor.socks_port = 9050
     config.tor.control_port = None
     with open('example-input.txt', 'w+') as f:
         f.write('http://torproject.org/\n')
         f.write('http://bridges.torproject.org/\n')
         f.write('http://blog.torproject.org/\n')
Ejemplo n.º 5
0
 def test_perform_a_lookup(self):
     if not is_internet_connected():
         self.skipTest(
             "You must be connected to the internet to run this test")
     dns_test = dnst.DNSTest()
     dns_test._setUp()
     result = yield dns_test.performALookup('example.com',
                                            dns_server=('8.8.8.8', 53))
     self.assertEqual(result, ['93.184.216.34'])
Ejemplo n.º 6
0
    def setUp(self):
        super(TestRunDirector, self).setUp()
        if not is_internet_connected():
            self.skipTest("You must be connected to the internet to run this test")

        self.filenames = ['example-input.txt']
        with open('example-input.txt', 'w+') as f:
            f.write('http://torproject.org/\n')
            f.write('http://bridges.torproject.org/\n')
            f.write('http://blog.torproject.org/\n')
 def setUp(self):
     if not is_internet_connected():
         self.skipTest("You must be connected to the internet to run this test")
     config.tor.socks_port = 9050
     config.tor.control_port = None
     self.filenames = ["example-input.txt"]
     with open("example-input.txt", "w+") as f:
         f.write("http://torproject.org/\n")
         f.write("http://bridges.torproject.org/\n")
         f.write("http://blog.torproject.org/\n")
Ejemplo n.º 8
0
    def setUp(self):
        super(TestRunDirector, self).setUp()
        if not is_internet_connected():
            self.skipTest(
                "You must be connected to the internet to run this test")

        self.filenames = ['example-input.txt']
        with open('example-input.txt', 'w+') as f:
            f.write('http://torproject.org/\n')
            f.write('http://bridges.torproject.org/\n')
            f.write('http://blog.torproject.org/\n')
Ejemplo n.º 9
0
 def setUp(self):
     super(TestRunDirector, self).setUp()
     if not is_internet_connected():
         self.skipTest("You must be connected to the internet to run this test")
     elif not hasRawSocketPermission():
         self.skipTest("You must run this test as root or have the capabilities "
         "cap_net_admin,cap_net_raw+eip")
     config.tor.socks_port = 9050
     config.tor.control_port = None
     self.filenames = ['example-input.txt']
     with open('example-input.txt', 'w+') as f:
         f.write('http://torproject.org/\n')
         f.write('http://bridges.torproject.org/\n')
         f.write('http://blog.torproject.org/\n')
Ejemplo n.º 10
0
 def setUp(self):
     super(TestRunDirector, self).setUp()
     if not is_internet_connected():
         self.skipTest("You must be connected to the internet to run this test")
     try:
         checkForRoot()
     except InsufficientPrivileges:
         self.skipTest("You must be root to run this test")
     config.tor.socks_port = 9050
     config.tor.control_port = None
     self.filenames = ['example-input.txt']
     with open('example-input.txt', 'w+') as f:
         f.write('http://torproject.org/\n')
         f.write('http://bridges.torproject.org/\n')
         f.write('http://blog.torproject.org/\n')
Ejemplo n.º 11
0
 def setUp(self):
     super(TestRunDirector, self).setUp()
     if not is_internet_connected():
         self.skipTest(
             "You must be connected to the internet to run this test")
     elif not hasRawSocketPermission():
         self.skipTest(
             "You must run this test as root or have the capabilities "
             "cap_net_admin,cap_net_raw+eip")
     config.tor.socks_port = 9050
     config.tor.control_port = None
     self.filenames = ['example-input.txt']
     with open('example-input.txt', 'w+') as f:
         f.write('http://torproject.org/\n')
         f.write('http://bridges.torproject.org/\n')
         f.write('http://blog.torproject.org/\n')
Ejemplo n.º 12
0
 def setUp(self):
     if not is_internet_connected():
         self.skipTest("You must be connected to the internet to run this test")
Ejemplo n.º 13
0
 def setUp(self):
     if not is_internet_connected():
         self.skipTest(
             "You must be connected to the internet to run this test")