Skip to content

Instantly share code, notes, and snippets.

@LondonAppDev
Created January 24, 2014 17:16
Show Gist options
  • Save LondonAppDev/8601779 to your computer and use it in GitHub Desktop.
Save LondonAppDev/8601779 to your computer and use it in GitHub Desktop.
class SubVenueModelTest(TestCase):
def test_create_subvenue_and_get_name(self):
location = create_location(2, "Test Location2")
venue = create_venue(name="Test_Venue2",location=location)
sport1 = create_sport("Test")
sub_venue = models.SubVenue()
sub_venue.venue=venue
sub_venue.name="Test Sub Venuexxx"
sub_venue.sports.add(sport1.id)
sub_venue.save()
self.assertEqual(sub_venue.name, "Test Sub Venuexxx")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment