add flash message
This commit is contained in:
@@ -44,14 +44,16 @@ def test_add_email(
|
||||
)
|
||||
|
||||
assert r['statusCode'] == HTTPStatus.CREATED
|
||||
email_verification = dynamodb_persistence_layer.collection.query(
|
||||
r = dynamodb_persistence_layer.collection.query(
|
||||
KeyPair(
|
||||
'15bacf02-1535-4bee-9022-19d106fd7518',
|
||||
'EMAIL_VERIFICATION',
|
||||
)
|
||||
)
|
||||
assert 'name' in email_verification['items'][0]
|
||||
assert email_verification['items'][0]['email'] == 'osergiosiqueira+pytest@gmail.com'
|
||||
items = r['items']
|
||||
|
||||
assert len(items) == 2
|
||||
assert any(x.get('email') == 'osergiosiqueira+pytest@gmail.com' for x in items)
|
||||
|
||||
|
||||
def test_email_as_primary(
|
||||
@@ -59,6 +61,7 @@ def test_email_as_primary(
|
||||
seeds,
|
||||
http_api_proxy: HttpApiProxy,
|
||||
lambda_context: LambdaContext,
|
||||
dynamodb_persistence_layer: DynamoDBPersistenceLayer,
|
||||
):
|
||||
r = app.lambda_handler(
|
||||
http_api_proxy(
|
||||
@@ -75,6 +78,12 @@ def test_email_as_primary(
|
||||
|
||||
assert r['statusCode'] == HTTPStatus.NO_CONTENT
|
||||
|
||||
r = dynamodb_persistence_layer.collection.get_item(
|
||||
KeyPair('15bacf02-1535-4bee-9022-19d106fd7518', '0')
|
||||
)
|
||||
assert r['email'] == 'osergiosiqueira@gmail.com'
|
||||
assert r['emails'] == {'osergiosiqueira@gmail.com', 'sergio@somosbeta.combr'}
|
||||
|
||||
|
||||
def test_verify_email(
|
||||
app,
|
||||
|
||||
Reference in New Issue
Block a user