Changeset 10352


Ignore:
Timestamp:
22 Jun 2013, 21:53:53 (12 years ago)
Author:
uli
Message:

Make sure CASServer options can be set via paste.deploy ini file.

Location:
main/waeup.cas/trunk/waeup/cas/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.cas/trunk/waeup/cas/tests/sample2.ini

    r10351 r10352  
    11# A sample config to run WSGI components with paster
     2# This config is with all possible options set explicitly.
    23[app:main]
    34use = egg:waeup.cas#server
     5# what file to use to store tickets, credentials, etc.
     6db_path = /a/path/to/cas.db
  • main/waeup.cas/trunk/waeup/cas/tests/test_server.py

    r10351 r10352  
    2121        self.paste_conf1 = os.path.join(
    2222            os.path.dirname(__file__), 'sample1.ini')
     23        self.paste_conf2 = os.path.join(
     24            os.path.dirname(__file__), 'sample2.ini')
    2325
    2426    def tearDown(self):
     
    3234        app = loadapp('config:%s' % self.paste_conf1)
    3335        assert isinstance(app, CASServer)
     36        assert hasattr(app, 'db_path')
     37        assert app.db_path is not None
    3438
    3539    def test_paste_deploy_options(self):
    3640        # we can set CAS server-related options via paste.deploy config
    37         app = loadapp('config:%s' % self.paste_conf1)
     41        app = loadapp('config:%s' % self.paste_conf2)
    3842        assert isinstance(app, CASServer)
     43        assert app.db_path == '/a/path/to/cas.db'
    3944
    4045    def test_init(self):
Note: See TracChangeset for help on using the changeset viewer.