當前位置: 首頁>>代碼示例>>Python>>正文


Python mock_mail_server.SmtpServerHarness類代碼示例

本文整理匯總了Python中ckan.tests.mock_mail_server.SmtpServerHarness的典型用法代碼示例。如果您正苦於以下問題:Python SmtpServerHarness類的具體用法?Python SmtpServerHarness怎麽用?Python SmtpServerHarness使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了SmtpServerHarness類的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: setup_class

 def setup_class(cls):
     model.repo.rebuild_db()
     DguCreateTestData.create_dgu_test_data()
     cls.publisher_controller = 'ckanext.dgu.controllers.publisher:PublisherController'
     import ckanext.dgu.model.publisher_request as pr_model
     pr_model.init_tables(model.meta.engine)
     SmtpServerHarness.setup_class()
開發者ID:datagovuk,項目名稱:ckanext-dgu,代碼行數:7,代碼來源:test_publisher_forms.py

示例2: setup_class

 def setup_class(cls):
     smtp_server = config.get('smtp.test_server')
     if smtp_server:
         host, port = smtp_server.split(':')
         port = int(port) + int(str(hashlib.md5(cls.__name__).hexdigest())[0], 16)
         config['smtp.test_server'] = '%s:%s' % (host, port)
     SmtpServerHarness.setup_class()
     PylonsTestCase.setup_class()
開發者ID:1sha1,項目名稱:ckan,代碼行數:8,代碼來源:test_mock_mail_server.py

示例3: setup_class

 def setup_class(cls):
     smtp_server = config.get("smtp.test_server")
     if smtp_server:
         host, port = smtp_server.split(":")
         port = int(port) + int(str(hashlib.md5(cls.__name__).hexdigest())[0], 16)
         config["smtp.test_server"] = "%s:%s" % (host, port)
     CreateTestData.create_user(name="bob", email="[email protected]")
     CreateTestData.create_user(name="mary")  # NB No email addr provided
     SmtpServerHarness.setup_class()
     PylonsTestCase.setup_class()
開發者ID:BigOpenData,項目名稱:ckan,代碼行數:10,代碼來源:test_mailer.py

示例4: setup_class

 def setup_class(cls):
     smtp_server = config.get('smtp.test_server')
     if smtp_server:
         host, port = smtp_server.split(':')
         port = int(port) + int(str(hashlib.md5(cls.__name__).hexdigest())[0], 16)
         config['smtp.test_server'] = '%s:%s' % (host, port)
     CreateTestData.create_user(name='bob', email='[email protected]')
     CreateTestData.create_user(name='mary') #NB No email addr provided
     SmtpServerHarness.setup_class()
     PylonsTestCase.setup_class()
開發者ID:31H0B1eV,項目名稱:ckan,代碼行數:10,代碼來源:test_mailer.py

示例5: setup_class

    def setup_class(self):
        PylonsTestCase.setup_class()
        SmtpServerHarness.setup_class()
        CreateTestData.create()

        # make 3 changes, authored by annafan
        for i in range(3):
            rev = model.repo.new_revision()
            pkg = model.Package.by_name(u'annakarenina')
            pkg.notes = u'Changed notes %i' % i
            rev.author = u'annafan'
            model.repo.commit_and_remove()

        CreateTestData.create_user('unfinisher', about='<a href="http://unfinished.tag')
        CreateTestData.create_user('uncloser', about='<a href="http://unclosed.tag">')
        CreateTestData.create_user('spammer', about=u'<a href="http://mysite">mysite</a> <a href=\u201dhttp://test2\u201d>test2</a>')
        CreateTestData.create_user('spammer2', about=u'<a href="http://spamsite1.com\u201d>spamsite1</a>\r\n<a href="http://www.spamsite2.com\u201d>spamsite2</a>\r\n')
開發者ID:gabelula,項目名稱:ckan,代碼行數:17,代碼來源:test_user.py

示例6: teardown_class

 def teardown_class(self):
     SmtpServerHarness.teardown_class()
     model.repo.rebuild_db()
開發者ID:gabelula,項目名稱:ckan,代碼行數:3,代碼來源:test_user.py

示例7: teardown_class

 def teardown_class(self):
     # clear routes 'id' so that next test to run doesn't get it
     self.app.get(url_for(controller='user', action='login', id=None))
     SmtpServerHarness.teardown_class()
     model.repo.rebuild_db()
開發者ID:AltisCorp,項目名稱:ckan,代碼行數:5,代碼來源:test_user.py

示例8: teardown_class

 def teardown_class(cls):
     SmtpServerHarness.teardown_class()
開發者ID:1sha1,項目名稱:ckan,代碼行數:2,代碼來源:test_mock_mail_server.py

示例9: setup_class

 def setup_class(cls):
     DguCreateTestData.create_dgu_test_data()
     cls.publisher_controller = 'ckanext.dgu.controllers.publisher:PublisherController'
     SmtpServerHarness.setup_class()
開發者ID:diabulos,項目名稱:ckanext-dgu,代碼行數:4,代碼來源:test_publisher_forms.py

示例10: setup_class

 def setup_class(cls):
     CreateTestData.create_user(name='bob', email='[email protected]')
     CreateTestData.create_user(name='mary') #NB No email addr provided
     SmtpServerHarness.setup_class()
     PylonsTestCase.setup_class()
開發者ID:ciudadanointeligente,項目名稱:ckan,代碼行數:5,代碼來源:test_mailer.py

示例11: setup_class

 def setup_class(cls):
     SmtpServerHarness.setup_class()
     PylonsTestCase.setup_class()
開發者ID:ciudadanointeligente,項目名稱:ckan,代碼行數:3,代碼來源:test_mock_mail_server.py


注:本文中的ckan.tests.mock_mail_server.SmtpServerHarness類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。