Skip to content

Commit

Permalink
Check the readthedocs_processor in the notification's context
Browse files Browse the repository at this point in the history
  • Loading branch information
humitos committed Oct 22, 2020
1 parent bd693f0 commit 656862a
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions readthedocs/rtd_tests/tests/test_notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,18 @@ class TestNotification(Notification):
'foo': build,
'production_uri': 'https://readthedocs.org',
'request': req,

# readthedocs_processor context
'DASHBOARD_ANALYTICS_CODE': None,
'DO_NOT_TRACK_ENABLED': False,
'GLOBAL_ANALYTICS_CODE': None,
'PRODUCTION_DOMAIN': 'readthedocs.org',
'PUBLIC_DOMAIN': None,
'SITE_ROOT': mock.ANY,
'SUPPORT_EMAIL': None,
'TEMPLATE_ROOT': mock.ANY,
'USE_PROMOS': False,
'USE_SUBDOMAIN': False,
},
)

Expand Down Expand Up @@ -220,6 +232,18 @@ def test_context_data(self):
'request': None,
'production_uri': 'https://readthedocs.org',
'other': {'name': 'other name'},

# readthedocs_processor context
'DASHBOARD_ANALYTICS_CODE': None,
'DO_NOT_TRACK_ENABLED': False,
'GLOBAL_ANALYTICS_CODE': None,
'PRODUCTION_DOMAIN': 'readthedocs.org',
'PUBLIC_DOMAIN': None,
'SITE_ROOT': mock.ANY,
'SUPPORT_EMAIL': None,
'TEMPLATE_ROOT': mock.ANY,
'USE_PROMOS': False,
'USE_SUBDOMAIN': False,
}
self.assertEqual(self.n.get_context_data(), context)

Expand Down

0 comments on commit 656862a

Please sign in to comment.