Exemple #1
0
def test_detect(img_url=TEST_URLS[0]):
    assert_with(path('/detect?urls=%s' % img_url), face_detected)
Exemple #2
0
def test_detect_features(img_url=TEST_URLS[0], features=FEATURES):
    """Test 'fast face' feature detection (eyes, nose, mouth filled in)
    """
    assert_with(path('/detect?urls=%s' % img_url),
                partial(face_detected_with_features, features=features))
Exemple #3
0
def test_detect_single_face(img_url='http://lambdal.com/test2.jpg'):
    """Assert that there's only one face detected in this image
    """
    assert_with(path('/detect?urls=%s' % img_url), partial(face_detected,
                count=1))
Exemple #4
0
def test_gender(img_urls=TEST_URLS):
    """Assert that all female faces have been classified as such!
    """
    assert_with(path('/detect?urls=%s' % ','.join(img_urls)),
                partial(face_detected_with_gender, gender='female'))
Exemple #5
0
def test_detect_single_face(img_url='http://lambdal.com/test2.jpg'):
    """Assert that there's only one face detected in this image
    """
    assert_with(path('/detect?urls=%s' % img_url),
                partial(face_detected, count=1))
Exemple #6
0
def test_detect_features(img_url=TEST_URLS[0], features=FEATURES):
    """Test 'fast face' feature detection (eyes, nose, mouth filled in)
    """
    assert_with(path('/detect?urls=%s' % img_url),
                partial(face_detected_with_features, features=features))
Exemple #7
0
def test_gender(img_urls=TEST_URLS):
    """Assert that all female faces have been classified as such!
    """
    assert_with(path('/detect?urls=%s' % ','.join(img_urls)),
                partial(face_detected_with_gender, gender='female'))
Exemple #8
0
def test_detect(img_url=TEST_URLS[0]):
    assert_with(path('/detect?urls=%s' % img_url), face_detected)