~bkerensa/landscape-client/trunk

« back to all changes in this revision

Viewing changes to landscape/ui/model/configuration/tests/test_mechanism.py

- merge rename-password-to-key-ui [r=ack,cglass]

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
        config += "tags = a_tag\n"
24
24
        config += "url = https://landscape.canonical.com/message-system\n"
25
25
        config += "account_name = foo\n"
26
 
        config += "registration_password = boink\n"
 
26
        config += "registration_key = boink\n"
27
27
        config += "computer_title = baz\n"
28
28
        config += "https_proxy = https://proxy.localdomain:6192\n"
29
29
        config += "ping_url = http://landscape.canonical.com/ping\n"
154
154
        self.mechanism.set("ping_url", "bar")
155
155
        self.assertEqual("bar", self.mechanism.get("ping_url"))
156
156
 
157
 
    def test_get_registration_password(self):
158
 
        """
159
 
        Test that we can get the registration password from the mechanism.
160
 
        """
161
 
        self.assertEqual("boink", self.mechanism.get("registration_password"))
 
157
    def test_get_registration_key(self):
 
158
        """
 
159
        Test that we can get the registration key from the mechanism.
 
160
        """
 
161
        self.assertEqual("boink", self.mechanism.get("registration_key"))
162
162
 
163
 
    def test_set_registration_password(self):
164
 
        """
165
 
        Test that we can set the registration password via the mechanism.
166
 
        """
167
 
        self.mechanism.set("registration_password", "bar")
168
 
        self.assertEqual("bar", self.mechanism.get("registration_password"))
 
163
    def test_set_registration_key(self):
 
164
        """
 
165
        Test that we can set the registration key via the mechanism.
 
166
        """
 
167
        self.mechanism.set("registration_key", "bar")
 
168
        self.assertEqual("bar", self.mechanism.get("registration_key"))
169
169
 
170
170
    def test_get_computer_title(self):
171
171
        """