Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix field init tests. Thanks Josh Bohde

  • Loading branch information...
commit 179ab3fb279dbc6d9b9f75db9195606a22aebdca 1 parent 7b37078
Issac Kelly issackelly authored

Showing 1 changed file with 6 additions and 5 deletions. Show diff stats Hide diff stats

  1. +6 5 tests/content_gfk/tests/fields.py
11 tests/content_gfk/tests/fields.py
@@ -9,16 +9,17 @@
9 9 class ContentTypeFieldTestCase(TestCase):
10 10
11 11 def test_init(self):
  12 + # Test that you have to use a dict some other resources
12 13 with self.assertRaises(ValueError):
13   - # Test that you have to use a dict some other resources
14 14 GenericForeignKeyField(((Note, NoteResource)), 'nofield')
15 15
16   - # Test that you must register some other resources
  16 + # Test that you must register some other resources
  17 + with self.assertRaises(ValueError):
17 18 GenericForeignKeyField({}, 'nofield')
18 19
19   - # Test that the resources you raise must be models
20   - GenericForeignKeyField({'str': 'ing'}, 'nofield')
21   -
  20 + # Test that the resources you raise must be models
  21 + with self.assertRaises(ValueError):
  22 + GenericForeignKeyField({NoteResource: Note}, 'nofield')
22 23
23 24 def test_get_related_resource(self):
24 25 gfk_field = GenericForeignKeyField({

0 comments on commit 179ab3f

Please sign in to comment.
Something went wrong with that request. Please try again.