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