Skip to content

Latest commit

 

History

History
20 lines (13 loc) · 516 Bytes

File metadata and controls

20 lines (13 loc) · 516 Bytes

#Testing

##Generating django south fixture for text data

  1. Change name of database in settings:

    DATABASES = { 'default': { 'NAME': 'product_test',

  2. Create new database with same permissions as regular database

  3. python manage.py syncdb --all

  4. Massage data

  5. python manage.py dumpdata --format=json --indent=4 app.ModelName > app/fixtures/test-modelname.json

  6. Add fixture.json to test fixture:

    class TestModels(TestCase): fixtures = ['test_all_models.json']