Re: how to test an application that's using a legacy database

2014-11-11 Thread dpalao . python
Dear Carl, Thank you for the answer. On Tuesday, November 11, 2014 3:13:18 PM UTC+1, Carl Meyer wrote: > > Hi David, > > On 11/11/2014 07:01 AM, dpalao...@gmail.com wrote: > > I see your point. You might be right, but it is not clear to me how to > > do it and if it would work: I have

Re: how to test an application that's using a legacy database

2014-11-11 Thread dpalao . python
Dear Carl, I see your point. You might be right, but it is not clear to me how to do it and if it would work: I have already tried to subclass DiscoverRunner to modify its behaviour with little success. Another problem that I see: it is not an homogenous approach. I mean, the models are created

Re: how to test an application that's using a legacy database

2014-11-11 Thread dpalao . python
Dear Fred, Thanks a lot for the answer. Actually I got very happy when I saw it. But I sadly found out that it does not work in my case. I think the problem is related to the way Django-1.7 behaves with respect to databases, migrations and so on. Not 100% sure, though. I don't really know

Re: how to test an application that's using a legacy database

2014-11-10 Thread dpalao . python
On Monday, November 10, 2014 4:08:15 PM UTC+1, donarb wrote: > > > > On Monday, November 10, 2014 7:00:12 AM UTC-8, dpalao...@gmail.com wrote: >> >> Here comes the context. Sorry. >> >> On Monday, November 10, 2014 3:49:40 PM UTC+1, larry@gmail.com wrote: >>> >>> >>> No, when you run syncdb it

Re: how to test an application that's using a legacy database

2014-11-10 Thread dpalao . python
On Monday, November 10, 2014 4:03:57 PM UTC+1, larry@gmail.com wrote: > > On Mon, Nov 10, 2014 at 10:00 AM, > wrote: > > Here comes the context. Sorry. > > > > On Monday, November 10, 2014 3:49:40 PM UTC+1, larry@gmail.com > wrote: > >> > >> > >> No, when

Re: how to test an application that's using a legacy database

2014-11-10 Thread dpalao . python
Here comes the context. Sorry. On Monday, November 10, 2014 3:49:40 PM UTC+1, larry@gmail.com wrote: > > > No, when you run syncdb it will not create or modify any existing > tables, only create new ones. > Again, are the docs

Re: how to test an application that's using a legacy database

2014-11-10 Thread dpalao . python
So what is written in the docs is wrong? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to

how to test an application that's using a legacy database

2014-11-10 Thread dpalao . python
Hi, I'm writing a Django application that uses an existing database. If I understood it well, in such a case one must create non-managed models for the legacy tables to avoid Django creating already existing tables, right? For instance, this is how one of my models looks like: class

Re: running unit tests with legacy database: Error 1050, Table already exists

2014-11-07 Thread dpalao . python
I think I should start a new thread. It is a different problem, after all. On Thursday, November 6, 2014 5:13:09 PM UTC+1, David Palao wrote: > > Hi Collin, > Thanks a lot for the answer. I think you are right, and that was what > I was doing. Still, apparently the models could not be created

running unit tests with legacy database: Error 1050, Table already exists

2014-11-04 Thread dpalao . python
Hello, I'm relatively new to Django, so it might well be a silly question... I'm using Django-1.7 with Python-3.3. I'm working with a legacy MySQL database. I tried both pymysql and mysql-connector-python, the errors are similar. When I run the unit tests, for instance, with