mirror of
https://github.com/jazzband/django-analytical.git
synced 2026-03-16 22:20:25 +00:00
add custom identity test
This commit is contained in:
parent
248e04aef5
commit
7e28ee31f1
1 changed files with 13 additions and 0 deletions
|
|
@ -46,6 +46,19 @@ class GetIdentityTestCase(TestCase):
|
|||
get_id = get_identity(Context({}), user=MyUser(identity='fake_id'))
|
||||
assert get_id == 'fake_id'
|
||||
|
||||
def test_custom_identity_specific_provider(self):
|
||||
get_id = get_identity(Context({
|
||||
'foo_provider_identity': 'bar',
|
||||
'analytical_identity': 'baz',
|
||||
}), prefix='foo_provider')
|
||||
assert get_id == 'bar'
|
||||
|
||||
def test_custom_identity_general(self):
|
||||
get_id = get_identity(Context({
|
||||
'analytical_identity': 'baz',
|
||||
}), prefix='foo_provider')
|
||||
assert get_id == 'baz'
|
||||
|
||||
|
||||
@override_settings(ANALYTICAL_DOMAIN="example.org")
|
||||
class GetDomainTestCase(TestCase):
|
||||
|
|
|
|||
Loading…
Reference in a new issue