def test_non_existing_extension(self): ext = 'file' expected = '' got = get_extension(ext) assert expected == got
def test_wrong_extension_type(self): exts = [dict(), False, True, [], 123] expected = '' for ext in exts: got = get_extension(ext) assert expected == got
def test_existing_extension_valid(self): ext = 'file.puk' expected = 'puk' got = get_extension(ext) assert expected == got