def test_count_ssl_ips(self): ip = Ip() data = "aba[bab]xyz\n" + \ "aaaabaaaaaa[sad]xyz[asd]qwe[babababaab]ababababababadasdd\n" + \ "aaa[sad]xyz[asd]qwe[ababa]aababa\n" + \ "xyx[xyx]xyx\n" + \ "aaa[kek]eke\n" + \ "zazbz[bzb]cdb" self.assertEquals(ip.count_ssl_ips(data), 5)
from Ip import Ip ip = Ip() print(ip.count_tls_ips(open("day07/input.txt").read())) print(ip.count_ssl_ips(open("day07/input.txt").read())) # 169 low