Merge lp:~bjornt/landscape-client/apt-facade-arch into lp:~landscape/landscape-client/trunk

Proposed by Björn Tillenius
Status: Merged
Approved by: Free Ekanayaka
Approved revision: 401
Merged at revision: 368
Proposed branch: lp:~bjornt/landscape-client/apt-facade-arch
Merge into: lp:~landscape/landscape-client/trunk
Prerequisite: lp:~bjornt/landscape-client/apt-channel-deb-dir
Diff against target: 0 lines
To merge this branch: bzr merge lp:~bjornt/landscape-client/apt-facade-arch
Reviewer Review Type Date Requested Status
Free Ekanayaka (community) Approve
Alberto Donato (community) Approve
Review via email: mp+77695@code.launchpad.net

Description of the change

  * Implement setting and getting the architecture in AptFacade.
  * Implement ensure_channels_reloaded() in AptFacade

To post a comment you must log in.
Revision history for this message
Alberto Donato (ack) wrote :

Looks good! +1

#1:
+ first called. If it called more time, it has no effect.

typo, should be something like "If called more times"

review: Approve
Revision history for this message
Free Ekanayaka (free.ekanayaka) wrote :

Looks good! +1

[1]

+ apt_pkg.config.set("APT::Architecture", "i386")

I'd reccomend to not inspect the internal state of apt_pkg in the tests, as it makes them a bit "whiteboxy". Instead, I think a simple

def test_set_and_get_arch(self):
    self.facade.set_arch("some-arch")
    self.assertEqual("some-arch", self.facade.get_arch())

combined with the existing test_set_arch_get_packages is enough to fully test the behavior.

review: Approve
Revision history for this message
Björn Tillenius (bjornt) wrote :

On Fri, Sep 30, 2011 at 03:23:35PM -0000, Alberto Donato wrote:
> Review: Approve
>
> Looks good! +1
>
> #1:
> + first called. If it called more time, it has no effect.
>
> typo, should be something like "If called more times"

Actually, I meant "If it's called...". Fixed.

--
Björn Tillenius | https://launchpad.net/~bjornt

Revision history for this message
Björn Tillenius (bjornt) wrote :

On Mon, Oct 03, 2011 at 08:42:16AM -0000, Free Ekanayaka wrote:
> Review: Approve
>
> Looks good! +1
>
> [1]
>
> + apt_pkg.config.set("APT::Architecture", "i386")
>
> I'd reccomend to not inspect the internal state of apt_pkg in the tests, as it makes them a bit "whiteboxy". Instead, I think a simple
>
> def test_set_and_get_arch(self):
> self.facade.set_arch("some-arch")
> self.assertEqual("some-arch", self.facade.get_arch())
>
> combined with the existing test_set_arch_get_packages is enough to
> fully test the behavior.

Sure.

--
Björn Tillenius | https://launchpad.net/~bjornt

402. By Björn Tillenius

Typo.

403. By Björn Tillenius

Don't use apt internals in the tests.

Preview Diff

Empty

Subscribers

People subscribed via source and target branches

to all changes: