Save the test fixtures as JSON rather than XML, this seems to speed up

the tests by 10-15%
 - Legacy-Id: 6302
This commit is contained in:
Ole Laursen 2013-09-29 13:31:10 +00:00
parent 3701f2ac7d
commit 37825f2e5e
3 changed files with 3542 additions and 2276 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -17,8 +17,8 @@ from django.db.models import Q
def output(name, qs):
try:
f = open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "fixtures/%s.xml" % name), 'w')
f.write(serialize("xml", qs, indent=4))
f = open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "fixtures/%s.json" % name), 'w')
f.write(serialize("json", qs, indent=1))
f.close()
except:
from django.db import connection