Esempio n. 1
0
    def test_equality(self, product):
        a = Settings([product], [product], self.web_payment_url,
                     self.promo_codes_enabled)
        b = Settings([product], [product], '', self.promo_codes_enabled)
        c = Settings([product], [product], self.web_payment_url, False)
        d = Settings([product], [product], self.web_payment_url,
                     self.promo_codes_enabled)

        assert a != b != c
        assert hash(a) != hash(b) != hash(c)
        assert a is not b is not c

        assert a == d
Esempio n. 2
0
def settings(product, price):
    return Settings([product], [product], TestSettings.web_payment_url, TestSettings.promo_codes_enabled, price)