예제 #1
0
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
예제 #2
0
def test_get_file_name_when_params_is_empty():
    key = ''
    serializer = TrelloCardSerializer()

    with pytest.raises(IndexError):
        serializer.get_file_name(key)