def setUp(self): self.mlist = create_mock_list() archivers = {'pipermail': True, 'hyperkitty': True} self.mlist.archivers.keys.side_effect = archivers.keys self.mlist.archivers.__getitem__.side_effect = archivers.__getitem__ self.mlist.archivers.__iter__.side_effect = archivers.__iter__ self.mlist.archivers.__contains__.side_effect = archivers.__contains__
def setUp(self): self.request_factory = RequestFactory() # create a mock list with members list_name = 'foolist.example.org' list_id = 'foolist.example.org' self.mock_list = create_mock_list( dict(fqdn_listname=list_name, list_id=list_id))
def setUp(self): self.request_factory = RequestFactory() # create a mock list with members list_name = 'foolist.example.org' list_id = 'foolist.example.org' self.mock_list = create_mock_list(dict( fqdn_listname=list_name, list_id=list_id))
def setUp(self): from django.test.client import RequestFactory from postorius.tests.utils import create_mock_list self.request_factory = RequestFactory() # create a mock list with members list_name = 'foolist.example.org' list_id = 'foolist.example.org' self.mock_list = create_mock_list( dict(fqdn_listname=list_name, list_id=list_id))
def setUp(self): from django.test.client import RequestFactory from postorius.tests.utils import create_mock_list self.request_factory = RequestFactory() # create a mock list with members list_name = 'foolist.example.org' list_id = 'foolist.example.org' self.mock_list = create_mock_list(dict( fqdn_listname=list_name, list_id=list_id))
def setUp(self): from django.test.client import RequestFactory from postorius.tests.utils import create_mock_list, create_mock_member self.request_factory = RequestFactory() # create a mock list with members list_name = '*****@*****.**' self.mock_list = create_mock_list(dict( fqdn_listname=list_name, members=[ create_mock_member(dict( fqdn_listname=list_name, address='*****@*****.**')), create_mock_member(dict( fqdn_listname=list_name, address='*****@*****.**')), ]))