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