liuyang1520 / django-command-extensions

Automatically exported from code.google.com/p/django-command-extensions
MIT License
0 stars 0 forks source link

test suite for dumpscript #71

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Because of it's sheer complexity, Dumpscript would do well to have an
automated testing framework, including test django apps, defining models to
have their data dumped.

Original issue reported on code.google.com by e.willha...@gmail.com on 15 Nov 2008 at 2:36

GoogleCodeExporter commented 8 years ago
Here is what I've written so far:
* Every relevant model field should be included in the testapp
* Tests are simply "expected vs actual output" for each given model
* dumpscript output is also then executed to check for exceptions
* New expected output files are created automatically when the test is run for 
the
first time, they can then be inspected and maybe edited for future tests

This will help identify regression problems, when new features are added/bugs 
fixed.

I have made a suggested directory layout:
  /tests/
  /tests/dumpscript/
  /tests/dumpscript/testapp/models.py
  /tests/dumpscript/scripts/initial_data.py
  /tests/dumpscript/scripts/test_test1.py   # expected data for test1
  /tests/dumpscript/dumpscripttest.py       # test code / utilities
  /tests/dumpscript/generic_relations.py    # the first test suite

Small changes have been made to dumpscript to help with testing (verbosity, 
output
stream)

Cheers,
Will

Original comment by e.willha...@gmail.com on 15 Nov 2008 at 2:45

Attachments: