Example #1
0
def test_email_exists_looks_up_user_by_email(user_model):
    node = DummyNode()

    try:
        schemas.email_exists(node, "*****@*****.**")
    except:
        pass

    user_model.get_by_email.assert_called_with("*****@*****.**")
Example #2
0
def test_email_exists_valid_when_user_exists(user_model):
    request = DummyRequest()
    node = DummyNode(request)

    result = schemas.email_exists(node, "*****@*****.**")

    assert result is None