コード例 #1
0
 def test_non_existing_extension(self):
     ext = 'file'
     expected = ''
     got = get_extension(ext)
     assert expected == got
コード例 #2
0
 def test_wrong_extension_type(self):
     exts = [dict(), False, True, [], 123]
     expected = ''
     for ext in exts:
         got = get_extension(ext)
         assert expected == got
コード例 #3
0
 def test_existing_extension_valid(self):
     ext = 'file.puk'
     expected = 'puk'
     got = get_extension(ext)
     assert expected == got