Re: How should it make django test create a default_test database that is using 5 shemas ?

2016-02-04 Thread JAMES DAMILD ETIENNE
Ok thanks , make sense , 'ill try to do that thank you 

>
>
>
>
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/85b8a24a-413a-4426-8d3e-33433ddfc20f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How should it make django test create a default_test database that is using 5 shemas ?

2016-02-04 Thread Michal Petrucha
On Fri, Jan 29, 2016 at 02:50:07PM -0800, JAMES DAMILD ETIENNE wrote:
> I have a possgres database with 5 shemas , it connects very well to it , 
> but when truing to do unit test on my models or view , the default table 
> created in sqllite3 is saysing  that on of my table is not there :
> 
>  return Database.Cursor.execute(self, query, params)
> OperationalError: no such table: jamestable
> 
> any help please  ?
> thank you

In general, it's not a good idea to run tests against a different
database system than the one you're using in production. If your live
application runs with Postgres, then use Postgres for your tests, too.
Just create a new test database, and point the test runner to that.

If you use a different SQL implementation for your tests, sooner or
later, your application will fail in production even though the same
feature will work just fine in your tests. Every SQL implementation is
different, sometimes in obvious ways, sometimes in subtle ones. Do
yourself a favor and learn from the legions of people who learned this
lesson the hard way.

As far as I know, SQLite does not have any support for multiple
schemas in a single database. Therefore I cannot imagine how your code
could ever work against SQLite, if the code expects a schema to be
there.

Good luck,

Michal

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/20160204161712.GM19381%40konk.org.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Digital signature


Re: How should it make django test create a default_test database that is using 5 shemas ?

2016-02-04 Thread JAMES DAMILD ETIENNE


>
> any help please  ?
> thank you
>

On Friday, January 29, 2016 at 6:31:17 PM UTC-5, JAMES DAMILD ETIENNE wrote:
>
> I have a possgres database with 5 shemas , it connects very well to it , 
> but when truing to do unit test on my models or view , the default table 
> created in sqllite3 is saysing  that on of my table is not there :
>
>  return Database.Cursor.execute(self, query, params)
> OperationalError: no such table: jamestable
>
> any help please  ?
> thank you
>
>
>
>
>

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4df0b27e-6afb-4cd5-9fbf-88306fc1dac0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.