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