Re: Initial data, tests and migrations

2017-02-22 Thread Tim Graham
I'm not trying to be antagonistic, sorry if I came off that way. I wanted to point out the difficulties that Django encountered trying to provide "integration" tests like django-otp does. As others suggested, if django-otp provided tools to build your own integration tests, that might be a

Re: Initial data, tests and migrations

2017-02-22 Thread Melvyn Sopacua
On Wednesday 22 February 2017 15:13:47 'Tom Evans' via Django users wrote: > These tests exercise parts of django_otp that interact with parts of > my code. Successful tests indicate that those two parts interoperate > correctly. The tests are successful when run individually, but fail > when run

Re: Initial data, tests and migrations

2017-02-22 Thread Adam Stein
On Wed, 2017-02-22 at 15:06 +, 'Tom Evans' via Django users wrote: > On Wed, Feb 22, 2017 at 2:41 PM, Adam Stein wrote: > > > > On Wed, 2017-02-22 at 14:22 +, 'Tom Evans' via Django users > > wrote: > > > > The URL you refer to mentions about loading data for apps.

Re: Initial data, tests and migrations

2017-02-22 Thread Melvyn Sopacua
On Wednesday 22 February 2017 14:22:36 'Tom Evans' via Django users wrote: > On Wed, Feb 22, 2017 at 12:47 AM, Melvyn Sopacua wrote: > > On Tuesday 21 February 2017 19:00:42 'Tom Evans' via Django users wrote: > >> What is the "correct" way of ensuring that these

Re: Initial data, tests and migrations

2017-02-22 Thread 'Tom Evans' via Django users
On Wed, Feb 22, 2017 at 2:40 PM, Tim Graham wrote: > I'm curious if you feel that running django_otp's tests as part of your > project's tests is adding value. I'm curious whether you think I commonly spend my time doing things that I don't think add value... django_otp is

Re: Initial data, tests and migrations

2017-02-22 Thread 'Tom Evans' via Django users
On Wed, Feb 22, 2017 at 2:41 PM, Adam Stein wrote: > On Wed, 2017-02-22 at 14:22 +, 'Tom Evans' via Django users wrote: > > The URL you refer to mentions about loading data for apps. Doesn't mention > anything in regards to tests. Why are fixtures bad for tests? In fact,

Re: Initial data, tests and migrations

2017-02-22 Thread Tim Graham
I'm curious if you feel that running django_otp's tests as part of your project's tests is adding value. All third-party apps that I've used (including tests for django.contrib apps*) have moved their tests to a separate directory so that they're not installed along with the application. It's

Re: Initial data, tests and migrations

2017-02-22 Thread Adam Stein
On Wed, 2017-02-22 at 14:22 +, 'Tom Evans' via Django users wrote: > On Wed, Feb 22, 2017 at 12:47 AM, Melvyn Sopacua > om> wrote: > > > > On Tuesday 21 February 2017 19:00:42 'Tom Evans' via Django users > > wrote: > > > > > > > > > > > > Previously, these instances were loaded from a

Re: Initial data, tests and migrations

2017-02-22 Thread 'Tom Evans' via Django users
On Wed, Feb 22, 2017 at 12:47 AM, Melvyn Sopacua wrote: > On Tuesday 21 February 2017 19:00:42 'Tom Evans' via Django users wrote: > > > >> Previously, these instances were loaded from a JSON fixtures file, > > > > And you can still do that. > > > >> which used to be the

Re: Initial data, tests and migrations

2017-02-21 Thread Melvyn Sopacua
On Tuesday 21 February 2017 19:00:42 'Tom Evans' via Django users wrote: > Previously, these instances were loaded from a JSON fixtures file, And you can still do that. > which used to be the recommended way. For our own tests, we simply > load these fixtures in the setUp portion of the test;

Initial data, tests and migrations

2017-02-21 Thread 'Tom Evans' via Django users
Hi all I'm having some difficulty working out how I am supposed to provide initial data for testing purposes, particularly when the initial data is not immediately pertinent to the test. For instance, our project uses django_otp, which has some simple tests. However, these tests create user