import app.change_mac_address as c


def test_dec_to_hex():
    assert c.dec_to_hex(0) == '0'
    assert c.dec_to_hex(1) == '1'
    assert c.dec_to_hex(3) == '3'
    assert c.dec_to_hex(10) == 'a'
    assert c.dec_to_hex(11) == 'b'
    assert c.dec_to_hex(12) == 'c'
    assert c.dec_to_hex(15) == 'f'


@@ -1,8 +1,18 @@
+import re%0A
 import a
@@ -306,8 +306,276 @@
 == 'f'%0A%0A
+def test_get_hex_pair():%0A    %22%22%22Checks that it only returns valid hex digits.%22%22%22%0A    pattern = re.compile('(%5Ba-f%5D%7C%5Cd)')%0A    hex_pair = c.get_hex_pair()%0A%0A    assert len(hex_pair) == 2%0A    for hex_digit in hex_pair:%0A        assert pattern.match(hex_digit) is not None%0A%0A%0A

Add tests