Merge lp:~clint-fewbar/pyjuju/no-lsb-release into lp:pyjuju
Proposed by
Clint Byrum
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Jim Baker | ||||
Approved revision: | 599 | ||||
Merged at revision: | 599 | ||||
Proposed branch: | lp:~clint-fewbar/pyjuju/no-lsb-release | ||||
Merge into: | lp:pyjuju | ||||
Diff against target: |
30 lines (+10/-8) 1 file modified
juju/charm/tests/test_directory.py (+10/-8) |
||||
To merge this branch: | bzr merge lp:~clint-fewbar/pyjuju/no-lsb-release | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+130929@code.launchpad.net |
Description of the change
Fixes tests relying on /etc/lsb-release
Fixes tests relying on /etc/lsb-release
To post a comment you must log in.
Reviewers: mp+130929_ code.launchpad. net,
Message:
Please take a look.
Description:
Fixes tests relying on /etc/lsb-release
Fixes tests relying on /etc/lsb-release
https:/ /code.launchpad .net/~clint- fewbar/ juju/no- lsb-release/ +merge/ 130929
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/6750055/
Affected files: tests/test_ directory. py
A [revision details]
M juju/charm/
Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: <email address hidden>
+New revision: <email address hidden>
Index: juju/charm/ tests/test_ directory. py tests/test_ directory. py' tests/test_ directory. py 2012-09-14 15:33:33 +0000 tests/test_ directory. py 2012-10-23 03:30:14 +0000
=== modified file 'juju/charm/
--- juju/charm/
+++ juju/charm/
@@ -212,16 +212,18 @@
def test_internal_ symlink( self):
charm_ path = self.copy_charm() "/etc/lsb- release" , os.path. join(charm_ path, "foobar")) NamedTemporaryF ile(dir= '/tmp') as external_file: external_ file.name, join(charm_ path, "foobar"))
- os.symlink(
+ with tempfile.
+ os.symlink(
os.path.
- directory = CharmDirectory( charm_path) es(InvalidCharm File, directory. as_bundle) "foobar' Absolute links are invalid", str(e)) charm_path) es(InvalidCharm File, directory. as_bundle) "foobar' Absolute links are invalid", str(e))
- e = self.assertRais
- self.assertIn(
+ directory = CharmDirectory(
+ e = self.assertRais
+ self.assertIn(
def test_extract_ symlink( self):
charm_ path = self.copy_charm() "/etc/lsb- release" , os.path. join(charm_ path, "foobar")) NamedTemporaryF ile(dir= '/tmp') as external_file: external_ file.name, join(charm_ path, "foobar"))
- os.symlink(
+ with tempfile.
+ os.symlink(
os.path.
- directory = CharmDirectory( charm_path) es(InvalidCharm File, directory. as_bundle) "foobar' Absolute links are invalid", str(e)) charm_path) es(InvalidCharm File, directory. as_bundle) "foobar' Absolute links are invalid", str(e))
- e = self.assertRais
- self.assertIn(
+ directory = CharmDirectory(
+ e = self.assertRais
+ self.assertIn(