CRUD done for strings

This commit is contained in:
Bernardo Heynemann 2011-05-09 23:18:06 -03:00
parent 8f88ee61cb
commit 27430b89db
2 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -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):