Skip to content

Commit

Permalink
Test showing bulk_create fails.
Browse files Browse the repository at this point in the history
Refs #3.
  • Loading branch information
schinckel committed Jan 25, 2019
1 parent 9af3ce4 commit 55deb8e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/tests/test_simplest_expression.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ def test_create_works():
Person.objects.create(first_name='Foo', last_name='Bar')


def test_create_with_value_in_computed_field_works():
Person.objects.create(first_name='Foo', last_name='Bar', name='Foo Bar')


def test_object_loaded_can_be_saved():
Person.objects.create(first_name='Foo', last_name='Bar')
person = Person.objects.get()
person.first_name = 'Fooo'
person.save()


def test_computed_field_is_set_on_object():
Person.objects.create(first_name='Foo', last_name='Bar')
assert Person.objects.get().name == 'Foo Bar'
Expand Down Expand Up @@ -42,3 +53,7 @@ def test_cascading_field():

def test_ordering():
assert len(Person.objects.order_by('name')) == 0


def test_bulk_create():
Person.objects.bulk_create([Person(first_name='Bulk', last_name='Create')])

0 comments on commit 55deb8e

Please sign in to comment.