Skip to content
Permalink
Browse files

Add test that .update() overrides database defaults

  • Loading branch information...
mpessas committed Nov 25, 2013
1 parent eda1b86 commit 4fcfed999e82b08182b6c614553e7d707fdf4a6d
Showing with 6 additions and 0 deletions.
  1. +6 −0 tests/model_fields/tests.py
@@ -733,6 +733,12 @@ def test_field_is_fetched_on_select(self):
m.f # Access f to force its evaluation.
self.assertNumQueries(2)

def test_update_method_does_update_the_field(self):
SelectModel.objects.create(f='text')
SelectModel.objects.update(f='text2')
m = SelectModel.objects.all()[0]
self.assertEqual(m.f, 'text2')


class PrimaryKeysUseOnInsertUpdateTestCase(unittest.TestCase):

0 comments on commit 4fcfed9

Please sign in to comment.
You can’t perform that action at this time.