def test_get_file_name_when_receive_params(): key = 'candy.feature' serializer = TrelloCardSerializer() expected_result = 'candy' result = serializer.get_file_name(key) assert result == expected_result
def test_get_file_name_when_params_is_empty(): key = '' serializer = TrelloCardSerializer() with pytest.raises(IndexError): serializer.get_file_name(key)