def test_mismatch_sets_object(self): obj = object() mismatch = IsProxied().match(obj) self.assertEqual(obj, mismatch.obj)
def test_match(self): obj = ProxyFactory(object(), checker=NamesChecker()) self.assertEqual(None, IsProxied().match(obj))
def test_mismatch(self): obj = object() self.assertIsInstance(IsProxied().match(obj), IsNotProxied)
def test_makeBinaryPackageBuild_returns_proxy(self): bpb = self.factory.makeBinaryPackageBuild() self.assertThat(bpb, IsProxied())
def test_str(self): matcher = IsProxied() self.assertEqual("Is proxied.", str(matcher))
def test_makeSPPHForBPPH_returns_ISPPH(self): bpph = self.factory.makeBinaryPackagePublishingHistory() spph = self.factory.makeSPPHForBPPH(bpph) self.assertThat(spph, IsProxied()) self.assertThat(removeSecurityProxy(spph), Provides(ISourcePackagePublishingHistory))
def test_makeSourcePackagePublishingHistory_returns_proxied(self): spph = self.factory.makeSourcePackagePublishingHistory() self.assertThat(spph, IsProxied())
def test_makeDistroSeries_returns_proxy(self): distroseries = self.factory.makeDistroSeries() self.assertThat(distroseries, IsProxied())
def test_makeDistribution_returns_proxy(self): distribution = self.factory.makeDistribution() self.assertThat(distribution, IsProxied())
def test_makeBinaryPackagePublishingHistory_returns_proxied(self): bpph = self.factory.makeBinaryPackagePublishingHistory() self.assertThat(bpph, IsProxied())