~jcsackett/charmworld/bac-tag-constraints

« back to all changes in this revision

Viewing changes to charmworld/tests/test_models.py

[r=adeuring,abentley][bug=1204985][author=adeuring] do not try to use non-existent value charm['store_data']['address'] in templates; property Charm.address added.

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
        self.assertNotEqual(charm_1, charm_2)
111
111
        self.assertEqual(charm_1, charm_3)
112
112
 
 
113
    def test_address(self):
 
114
        # The address property is a string.
 
115
        charm_data = factory.get_charm_json(
 
116
            owner='owner', series='series', name='name')
 
117
        charm = Charm(charm_data)
 
118
        self.assertEqual(
 
119
            'cs:~owner/series/name', charm.address)
 
120
 
113
121
    def test_branch_spec(self):
114
122
        # The branch_spec property is a string.
115
123
        charm_data = factory.get_charm_json(