def test_from_ietf_code__unknown_code_returning_none(): # Given code = 'trash' # When actual = sut.from_ietf_code(code, unknown=None) # Then assert actual is None
def test_from_ietf_code__unknown_code(): # Given code = 'trash' # When actual = sut.from_ietf_code(code) # Then assert Language('und') == actual
def test_from_ietf_code__valid_code(): # Given code = 'pt-BR' # When actual = sut.from_ietf_code(code) # Then assert Language('por', 'BR') == actual
def test_from_ietf_code__unknown_code_returning_none(): # Given code = 'trash' # When actual = sut.from_ietf_code(code, unknown=None) # Then assert actual is None
def test_from_ietf_code__unknown_code(): # Given code = 'trash' # When actual = sut.from_ietf_code(code) # Then assert Language('und') == actual
def test_from_ietf_code__valid_code(): # Given code = 'pt-BR' # When actual = sut.from_ietf_code(code) # Then assert Language('por', 'BR') == actual