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

2016-01-29 Thread JAMES DAMILD ETIENNE
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/6f4a1c60-dfed-4757-8eb8-9f632a1b5213%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


how to run django test with a default test database , while the real database is a posgres with 5 shemas ?

2016-01-29 Thread JAMES DAMILD ETIENNE
 any help please ?

-- 
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/b2563fc7-d1cd-4665-a060-c3725614d2c7%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 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.


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.


django unittest with post not working

2016-02-04 Thread JAMES DAMILD ETIENNE
Hi ,  will some help with this please ,
I am writting a django unittest for  a web app. when i do a post  like that 
:



r = self.client.post(reverse('login'), {'username': 't...@hotmail.com', 
'password': '12345'})
print 'logins page load>>',  r.status_code

the status code returns 302. it's  that normal ?

after i try to add some data  to the  create view like this  :


def test_brand_create(self):
r = self.client.get(reverse('brand_new'), follow=True)
self.assertEqual(r.status_code, 200, msg="brand_new Page loads")
print 'brand_new loads >>>',r.status_code
 
r = self.client.post(brand/new/', {'name': 'poko'})
print 'brand new post>>>' ,r.status_code


brand = Brand.objects.get(name='poko') ( this doesn't return anything 
error:>>> (DoesNotExist: Brand matching query does not exist.) it seems that 
the values didn't get posted  via the url )
   
 self.assertIsNotNone(brand, msg="brand  object created")
print "brand  object created>>>",brand 


any idea what am doing 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 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/90d21384-c1f4-4622-be1e-738682cc529e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django unittest with post not working

2016-02-05 Thread JAMES DAMILD ETIENNE

Yes but it stillnot saving the data after posting :/

-- 
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/5e6648df-e4fe-4a43-86f5-3d4ebb80e23e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.