PageRenderTime 5ms CodeModel.GetById 2ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/test_dumpdata

https://bitbucket.org/bconstantin/django_polymorphic/
#! | 27 lines | 19 code | 8 blank | 0 comment | 0 complexity | 5d2966d8979d103d5ce4f94aed37ab40 MD5 | raw file
 1#!/bin/bash
 2
 3rm -f /var/tmp/django-polymorphic-test-db.sqlite3
 4rm -f /ram/django-polymorphic-test-db.sqlite3
 5
 6TMPFILE=/tmp/django-polymorphic-test.dump
 7
 8PYCMD="python$1"
 9
10echo
11echo "#####################################################################"
12echo "### Testing dumpdata"
13echo
14
15$PYCMD ./manage.py syncdb
16$PYCMD ./manage.py polymorphic_create_test_data
17
18$PYCMD ./manage.py dumpdata --indent=4 pexp >$TMPFILE
19
20if ! diff -w $TMPFILE pexp/dumpdata_test_correct_output.txt ; then
21    echo "#####################################################################"
22    echo "ERROR: test_dumpdata failed!"    
23    exit 10
24fi
25echo "#####################################################################"
26echo 'SUCCESS!'
27