def test_equality(self, auto_renewable):
        a = Subscription([auto_renewable])
        b = Subscription(None)

        assert a != b != auto_renewable
        assert hash(a) != hash(b) != hash(auto_renewable)
        assert a is not auto_renewable
Ejemplo n.º 2
0
    def test_equality(self, renewable_remainder, auto_renewable):
        a = Subscription(renewable_remainder, [auto_renewable],
                         [auto_renewable])
        b = Subscription(renewable_remainder, [], [auto_renewable])

        assert a != b != auto_renewable
        assert hash(a) != hash(b) != hash(auto_renewable)
        assert a is not auto_renewable
Ejemplo n.º 3
0
def subscription(renewable_remainder, auto_renewable, operator,
                 non_auto_renewable):
    return Subscription(
        renewable_remainder,
        [auto_renewable],
        [auto_renewable],
        [operator],
        non_auto_renewable,
        TestSubscription.can_start_trial,
        TestSubscription.mcdonalds,
        TestSubscription.end,
    )
Ejemplo n.º 4
0
def subscription(auto_renewable):
    return Subscription([auto_renewable], TestSubscription.can_start_trial, TestSubscription.mcdonalds,
                        TestSubscription.end)