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:
parent
3701f2ac7d
commit
37825f2e5e
3540
ietf/name/fixtures/names.json
Normal file
3540
ietf/name/fixtures/names.json
Normal file
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue