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'])
Exemple #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
Exemple #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
 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')
Exemple #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'])
    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")
Exemple #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')
 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')
Exemple #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')
Exemple #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')
 def setUp(self):
     if not is_internet_connected():
         self.skipTest("You must be connected to the internet to run this test")
Exemple #13
0
 def setUp(self):
     if not is_internet_connected():
         self.skipTest(
             "You must be connected to the internet to run this test")