adds more testing for segments
This commit is contained in:
21
tests/unit/test_middleware.py
Normal file
21
tests/unit/test_middleware.py
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import pytest
|
||||||
|
|
||||||
|
from tests.factories.site import SiteFactory
|
||||||
|
from tests.factories.segment import SegmentFactory
|
||||||
|
|
||||||
|
@pytest.mark.django_db
|
||||||
|
class TestUserSegmenting(object):
|
||||||
|
|
||||||
|
def setup(self):
|
||||||
|
"""
|
||||||
|
Sets up a user segment and a site root to test segmenting
|
||||||
|
"""
|
||||||
|
self.standard_segment = SegmentFactory(name='Standard')
|
||||||
|
self.time_only_segment = SegmentFactory(name='Time only')
|
||||||
|
self.site = SiteFactory()
|
||||||
|
|
||||||
|
|
||||||
|
def test_standard_segment(self, rf):
|
||||||
|
request = rf.get('/')
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user