Esempio n. 1
0
def test_detect(img_url=TEST_URLS[0]):
    assert_with(path('/detect?urls=%s' % img_url), face_detected)
Esempio n. 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))
Esempio n. 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))
Esempio n. 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'))
Esempio n. 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))
Esempio n. 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))
Esempio n. 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'))
Esempio n. 8
0
def test_detect(img_url=TEST_URLS[0]):
    assert_with(path('/detect?urls=%s' % img_url), face_detected)