def test_create_trained_model_svm():
    """Test create trained model for support vector machine"""
    classifier = ReviewClassifier('svm')
    train_data, train_target = classifier.build_dataset('test-reviews.csv')
    model = classifier.create_trained_model(train_data=train_data,
                                            train_target=train_target)
    assert model
def test_create_trained_model_nn():
    """Test create trained model for neural network"""
    classifier = ReviewClassifier('nn')
    train_data, train_target = classifier.build_dataset('test-reviews.csv')
    model = classifier.create_trained_model(train_data=train_data,
                                            train_target=train_target)
    assert model
def test_create_trained_model_rf():
    """Test create trained model for random forest"""
    classifier = ReviewClassifier('rf')
    train_data, train_target = classifier.build_dataset('test-reviews.csv')
    model = classifier.create_trained_model(train_data=train_data,
                                            train_target=train_target)
    assert model
def test_build_dataset():
    classifier = ReviewClassifier('nn')
    train_data, train_target = classifier.build_dataset('test-reviews.csv')
    assert len(train_data) == len(train_target)
    assert train_data[0][0] in [0, 1]
    assert train_target[0] in [0, 1]