Files
django-polymorphic/test_dumpdata
T
Bert Constantin a87481b8b5 polymorphic_dumpdata management command functionality removed;
the regular Django dumpdata command now automatically works correctly
for polymorphic models and all Django versions
(this is handled by PolymorphicModelBase now).
Testing for dumpdata has been added.
2010-10-20 09:31:42 +02:00

28 lines
718 B
Bash
Executable File

#!/bin/bash
rm -f /var/tmp/django-polymorphic-test-db.sqlite3
rm -f /ram/django-polymorphic-test-db.sqlite3
TMPFILE=/tmp/django-polymorphic-test.dump
PYCMD="python$1"
echo
echo "#####################################################################"
echo "### Testing dumpdata"
echo
$PYCMD ./manage.py syncdb
$PYCMD ./manage.py polymorphic_create_test_data
$PYCMD ./manage.py dumpdata --indent=4 pexp >$TMPFILE
if ! diff -w $TMPFILE pexp/dumpdata_test_correct_output.txt ; then
echo "#####################################################################"
echo "ERROR: test_dumpdata failed!"
exit 10
fi
echo "#####################################################################"
echo 'SUCCESS!'