Exemple #1
0
    def test_compute_totals(self):
        cmptr = Computer(0, 0, '', True)
        root = ET.fromstring(USAGERECORD_XML)
        cmptr.compute_totals(root)

        assert '1' == root.get('total_time')
        assert '1' == root.get('total_cpu')
        assert '1' == root.get('total_ram')
        assert '2' == root.get('total_disk')
        assert '1' == root.get('total_net_rx')
        assert '1' == root.get('total_net_tx')