def test_estatistica_igual_0(self): log = open('log/estatistica_de_protocolo','r') pacotes = parser_log_to_objects(log) log.close() estatistica = create_estatistica_protocolos_acessados(pacotes, 'nada') self.assertEquals(estatistica, 0)
def test_estatistica_de_acesso_por_UDP(self): log = open('log/estatistica_de_protocolo', 'r') pacotes = parser_log_to_objects(log) log.close() estatistica = create_estatistica_protocolos_acessados(pacotes, 'udp') self.assertEquals(estatistica, 70)