def test_mac_addr(self):
        string_xml = """<domain>
                          <devices>
                            <interface type="network">
                              <mac address="00:00:00:00" />
                            </interface>
                          </devices>
                        </domain>"""
        self.context.domain.XMLDesc.return_value = string_xml

        self.assertEqual(self.context.mac_address, '00:00:00:00')
        self.assertEqual(self.context._mac_address, '00:00:00:00')
MAC address is set if not present.
dataset/ETHPy150Open F-Secure/see/see/context/test/context_test.py/SeeContextTest.test_mac_addr