mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Fixed two failing tests
This commit is contained in:
@@ -67,6 +67,8 @@ def availability_handler(sender, **kwargs):
|
||||
var_restrictions.append(restriction)
|
||||
|
||||
if not var_restrictions:
|
||||
v['available'] = True
|
||||
v['price'] = None
|
||||
continue
|
||||
|
||||
# If this point is reached, there ARE time restrictions for this item
|
||||
|
||||
@@ -239,7 +239,7 @@ class TimeRestrictionTest(TestCase):
|
||||
self.assertTrue(v['available'])
|
||||
self.assertEqual(v['price'], 12)
|
||||
else:
|
||||
self.assertFalse(v['available'])
|
||||
self.assertTrue(v['available'])
|
||||
|
||||
def test_variation_specifics(self):
|
||||
self.item.properties.add(self.property)
|
||||
@@ -281,5 +281,7 @@ class TimeRestrictionTest(TestCase):
|
||||
if 'variation' in v and v['variation'].pk == self.variation1.pk:
|
||||
self.assertTrue(v['available'])
|
||||
self.assertEqual(v['price'], 8)
|
||||
else:
|
||||
elif 'variation' in v and v['variation'].pk == self.variation3.pk:
|
||||
self.assertFalse(v['available'])
|
||||
else:
|
||||
self.assertTrue(v['available'])
|
||||
|
||||
Reference in New Issue
Block a user