Luke Plant avatar Luke Plant committed e7c066a

Fixed test failure and bug with booking_problems_json

Comments (0)

Files changed (2)


         self.assertEqual(json['account']['post_code'], 'ABC')
     def test_booking_problems(self):
+        self.add_prices()
         acc1 = BookingAccount.objects.create(email="",
                                              name="Mr Foo")


         instance =
         # We will get errors later on if prices don't exist for the year chosen, so
         # we check that first.
-        if not Price.objects.filter(,
-                                    price_type=instance.price_type).exists():
+        if not is_booking_open(
             retval['problems'] = ['Prices have not been set for the year %d' %]
             problems, warnings = instance.get_booking_problems(booking_sec=True)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.