def setUp(self): CanvasTestCase.setUp(self) # Grab a limited availability sticker self.sticker = stickers.Sticker(1234, "test", cost=10, maximum=100) # Call stickers.add_sticker so that we can use the sticker by id in api calls. stickers.add_sticker(self.sticker)
def setUp(self): CanvasTestCase.setUp(self) self.sticker = stickers.Sticker(1234, "foobar", limited=True, maximum=10, cost=10) stickers.add_sticker(self.sticker)
def setUp(self): CanvasTestCase.setUp(self) self.sticker = stickers.Sticker(11111, "test", cost=10, maximum=100) stickers.add_sticker(self.sticker)
def test_overridden_unpurchasable(self): sticker = stickers.Sticker(31337, 'test', cost=1, purchasable=False) self.assertFalse(sticker.is_purchasable(create_user()))