Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(700)

Unified Diff: quickstart/tests/test_app.py

Issue 90060043: Make control-bucket optional.
Patch Set: Make control-bucket optional. Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « quickstart/tests/models/test_envs.py ('k') | quickstart/tests/test_manage.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: quickstart/tests/test_app.py
=== modified file 'quickstart/tests/test_app.py'
--- quickstart/tests/test_app.py 2014-04-04 15:49:16 +0000
+++ quickstart/tests/test_app.py 2014-04-21 21:02:09 +0000
@@ -572,23 +572,25 @@
] + self.make_status_calls(2))
-class TestGetAdminSecret(unittest.TestCase):
+class TestGetValueFromJenv(unittest.TestCase):
- def test_no_admin_secret(self):
+ def test_no_key(self):
with mock.patch('quickstart.manage.envs.load_generated',
lambda x: {}):
with self.assertRaises(ValueError) as exc:
- app.get_admin_secret('local', '/home/bac/.juju')
+ app.get_value_from_jenv(
+ 'local', '/home/bac/.juju', 'my-key')
expected = (
- u'admin-secret not found in '
+ u'my-key not found in '
'/home/bac/.juju/environments/local.jenv')
self.assertIn(expected, bytes(exc.exception))
def test_success(self):
expected = 'superchunk'
with mock.patch('quickstart.manage.envs.load_generated',
- lambda x: {'admin-secret': expected}):
- secret = app.get_admin_secret('local', '~bac/.juju')
+ lambda x: {'my-key': expected}):
+ secret = app.get_value_from_jenv(
+ 'local', '~bac/.juju', 'my-key')
self.assertEqual(expected, secret)
« no previous file with comments | « quickstart/tests/models/test_envs.py ('k') | quickstart/tests/test_manage.py » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b