add sentry client
This commit is contained in:
17
client-packages/sentry-auth-passbook/tests/test_views.py
Normal file
17
client-packages/sentry-auth-passbook/tests/test_views.py
Normal file
@ -0,0 +1,17 @@
|
||||
from __future__ import absolute_import, print_function
|
||||
|
||||
import pytest
|
||||
from sentry_auth_sentry.views import _get_name_from_email
|
||||
|
||||
expected_data = [
|
||||
('john.smith@example.com', 'John Smith'),
|
||||
('john@example.com', 'John'),
|
||||
('XYZ-234=3523@example.com', 'Xyz-234=3523'),
|
||||
('XYZ.1111@example.com', 'Xyz 1111'),
|
||||
('JOHN@example.com', 'John'),
|
||||
]
|
||||
|
||||
|
||||
@pytest.mark.parametrize("email,expected_name", expected_data)
|
||||
def test_get_name_from_email(email, expected_name):
|
||||
assert _get_name_from_email(email) == expected_name
|
Reference in New Issue
Block a user