CRUD done for strings
This commit is contained in:
parent
8f88ee61cb
commit
27430b89db
2 changed files with 3 additions and 3 deletions
2
Makefile
2
Makefile
|
@ -2,4 +2,4 @@ pyvows:
|
|||
@env PYTHONPATH=$$PYTHONPATH:. pyvows --cover --cover_package=django_pyvows --cover_threshold=100 vows/
|
||||
|
||||
db:
|
||||
@env PYTHONPATH=$$PYTHONPATH:. mysql -u root -e 'CREATE DATABASE IF NOT EXISTS django_pyvows' && python vows/sandbox/manage.py syncdb
|
||||
@env PYTHONPATH=$$PYTHONPATH:. mysql -u root -e 'DROP DATABASE IF EXISTS django_pyvows' && mysql -u root -e 'CREATE DATABASE IF NOT EXISTS django_pyvows' && python vows/sandbox/manage.py syncdb
|
||||
|
|
|
@ -33,8 +33,8 @@ def to_be_cruddable(topic):
|
|||
|
||||
assert getattr(updated, field.name) != getattr(instance, field.name), "The instance should have been updated but the field %s is the same in both the original instance and the updated one (%s)." % (field.name, getattr(updated, field.name))
|
||||
|
||||
topic.model.objects.delete(id=instance.id)
|
||||
object_count = topic.mode.objects.count()
|
||||
instance.delete()
|
||||
object_count = topic.model.objects.count()
|
||||
assert object_count == 0, "Object should have been deleted, but it wasn't (count: %d)" % object_count
|
||||
|
||||
def __create_instance(topic):
|
||||
|
|
Reference in a new issue