#16320: Please have view support for databases
-------------------------------------+-------------------------------------
               Reporter:             |          Owner:  nobody
  benedict.m.holland@…               |         Status:  new
                   Type:  New        |      Component:  Database layer
  feature                            |  (models, ORM)
              Milestone:             |       Severity:  Normal
                Version:  1.3        |       Keywords:
             Resolution:             |      Has patch:  0
           Triage Stage:  Design     |    Needs tests:  0
  decision needed                    |  Easy pickings:  0
    Needs documentation:  0          |
Patch needs improvement:  0          |
                  UI/UX:  0          |
-------------------------------------+-------------------------------------

Comment (by manfre):

 I've had to code around this limitation a few times. At first I had a test
 runner that would make all of the unmanaged models managed before the test
 database was built. All tests would populate the views with expected data.
 This had the nice benefit of not testing the views and only testing the
 python code.

 This is not practical for some more complex views, which forced me to
 evolve the set up. I now have a management command that builds the test
 database from SQL schema files. The db backend (django-mssql) I use
 supports an optional parameter TEST_CREATE, which instructs the backend
 whether or not is should build the test database before running tests. If
 your backend doesn't support a similar parameter, you can get the same
 behavior with a custom test runner.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16320#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to