~danilo/landscape-charm/openid-configuration

« back to all changes in this revision

Viewing changes to hooks/lib/tests/test_templates.py

  • Committer: Danilo Šegan
  • Date: 2015-03-26 09:02:12 UTC
  • Revision ID: danilo@canonical.com-20150326090212-l9dujk8vtl43z6a2
Add config to the required_data instead of passing it through leader context.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 
5
5
from lib.tests.helpers import TemplateTest
6
6
from lib.tests.sample import (
7
 
    SAMPLE_DB_UNIT_DATA, SAMPLE_LEADER_CONTEXT_DATA,
8
 
    SAMPLE_LEADER_CONTEXT_DATA_WITH_OPENID, SAMPLE_AMQP_UNIT_DATA)
 
7
    SAMPLE_DB_UNIT_DATA, SAMPLE_LEADER_CONTEXT_DATA, SAMPLE_AMQP_UNIT_DATA)
9
8
 
10
9
 
11
10
class ServiceConfTest(TemplateTest):
22
21
            "db": [SAMPLE_DB_UNIT_DATA],
23
22
            "amqp": [SAMPLE_AMQP_UNIT_DATA],
24
23
            "leader": SAMPLE_LEADER_CONTEXT_DATA,
 
24
            "config": {},
25
25
        }
26
26
        buffer = StringIO(self.template.render(context))
27
27
        config = ConfigParser()
45
45
        context = {
46
46
            "db": [SAMPLE_DB_UNIT_DATA],
47
47
            "amqp": [SAMPLE_AMQP_UNIT_DATA],
48
 
            "leader": SAMPLE_LEADER_CONTEXT_DATA_WITH_OPENID,
 
48
            "leader": SAMPLE_LEADER_CONTEXT_DATA,
 
49
            "config": {
 
50
                "openid-provider-url": "http://openid-host/",
 
51
                "openid-logout-url": "http://openid-host/logout",
 
52
            },
49
53
        }
50
54
        buffer = StringIO(self.template.render(context))
51
55
        config = ConfigParser()