def test_ipv6_in_token_fail(self): expected_results = r'2a03:2880:fffe:c:face:b00c:0:35 is _not_ in GOOGLE_DNS' options = Namespace() options.ip = ('2a03:2880:fffe:c:face:b00c:0:35', ) options.token = ('GOOGLE_DNS') results = cgrep.compare_ip_token(options, self.db) self.assertEquals(results, expected_results)
def test_ipv6_in_token(self): expected_results = r'2001:4860:4860::8844 is in GOOGLE_DNS' options = Namespace() options.ip = ('2001:4860:4860::8844', ) options.token = ('GOOGLE_DNS') results = cgrep.compare_ip_token(options, self.db) self.assertEquals(results, expected_results)
def test_ip_in_token_fail(self): expected_results = r'69.171.239.12 is _not_ in GOOGLE_DNS' options = Namespace() options.ip = ('69.171.239.12', ) options.token = ('GOOGLE_DNS') results = cgrep.compare_ip_token(options, self.db) self.assertEquals(results, expected_results)
def test_ip_in_token(self): expected_results = r'8.8.8.8 is in GOOGLE_DNS' options = Namespace() options.ip = ('8.8.8.8', ) options.token = ('GOOGLE_DNS') results = cgrep.compare_ip_token(options, self.db) self.assertEquals(results, expected_results)
def test_ipv6_in_token_fail(self): expected_results = r'2a03:2880:fffe:c:face:b00c:0:35 is _not_ in GOOGLE_DNS' options = Namespace() options.ip = ('2a03:2880:fffe:c:face:b00c:0:35',) options.token = ('GOOGLE_DNS') results = cgrep.compare_ip_token(options, self.db) self.assertEquals(results, expected_results)
def test_ip_in_token_fail(self): expected_results = r'69.171.239.12 is _not_ in GOOGLE_DNS' options = Namespace() options.ip = ('69.171.239.12',) options.token = ('GOOGLE_DNS') results = cgrep.compare_ip_token(options, self.db) self.assertEquals(results, expected_results)
def test_ipv6_in_token(self): expected_results = r'2001:4860:4860::8844 is in GOOGLE_DNS' options = Namespace() options.ip = ('2001:4860:4860::8844',) options.token = ('GOOGLE_DNS') results = cgrep.compare_ip_token(options, self.db) self.assertEquals(results, expected_results)
def test_ip_in_token(self): expected_results = r'8.8.8.8 is in GOOGLE_DNS' options = Namespace() options.ip = ('8.8.8.8',) options.token = ('GOOGLE_DNS') results = cgrep.compare_ip_token(options, self.db) self.assertEquals(results, expected_results)