Re: testing in django

2017-05-29 Thread Marlysson Silva
If you are using the sqlite database to dummy test , you can in a test case class submit the post to sign up form ( and store at database ) and in other class retrieve the user created previously and performs the login . Em terça-feira, 23 de maio de 2017 04:07:29 UTC-3, Akash Tomar escreveu: >

Re: testing in django

2017-05-23 Thread Antonis Christofides
Hi, one possibility is this: class UserTest(TestCase): def setUp(self): self.my_data = {...} def test_create_account(self): response = self.client.post('/signup/', json.dumps(self.my_data), content_type='application/json') self.assertI

Re: testing in django

2017-05-23 Thread Александр Христюхин (roboslone)
Perhaps fixtures is what you want: https://code.djangoproject.com/wiki/Fixtures > On 23 May 2017, at 10:07, Akash Tomar wrote: > > class SignUpTest(TestCase): > def test_createAccount(self): > my_data = {'username': 'akash.tomar

testing in django

2017-05-23 Thread Akash Tomar
class SignUpTest(TestCase): def test_createAccount(self): my_data = {'username': 'akash.tomar107', 'password': 'akashtomar',"email":"akash.tomar...@gmail.com", "confirm_password":"akashtomar", "type_of_user":"1", "first_name":"akash", "last_name":"tomar"} response = self.client.post('/signup/',

Re: Unit testing in django for django template

2016-10-12 Thread ludovic coues
('.//input[@name="password"]')), 1) You'll need to install the package lxml for the import to work 2016-10-12 22:23 GMT+02:00 James Schneider : > In general, you would request the page and inspect the rendered output. > > https://docs.djangoproject.com/en/1.

Re: Unit testing in django for django template

2016-10-12 Thread James Schneider
In general, you would request the page and inspect the rendered output. https://docs.djangoproject.com/en/1.10/topics/testing/tools/#testing-responses -James On Wed, Oct 12, 2016 at 12:17 PM, wrote: > How to Unit testing in django for django template > > please any on

Unit testing in django for django template

2016-10-12 Thread codemaster472
How to Unit testing in django for django template please any one help me??? -- 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-user

Re: How to use selenium automated testing in django projects

2016-02-28 Thread Derek
I would separate out the two kinds of testing; one test to check the form functionality (and you do not have to use Selenium for this, btw); and one test to simulate how the Excel file is processed once it is loaded. For testing Excel, we use pre-created sheets with known, fixed data and test

Re: How to use selenium automated testing in django projects

2016-02-27 Thread Dan Tagg
Harry Percival is very good http://www.obeythetestinggoat.com Not sure if he covers Excel Dan On 27 Feb 2016 13:22, "Vikneswaran S J" wrote: > I need to use selenium automated testing for django application with input > from excel sheet. How to use use this feature? any idea? > > -- > You recei

How to use selenium automated testing in django projects

2016-02-27 Thread Vikneswaran S J
I need to use selenium automated testing for django application with input from excel sheet. How to use use this feature? any idea? -- 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

Re: Testing in Django - newbie questions on first test failure and coverage

2013-09-23 Thread Derek
Hi Yes, you are right: deleting the _fixture_setup method allows the tests to run successfully! I also do have all my fixture data stored in 'appname/fixtures/initial_data.json' so I assume from what you say that this data will only be loaded once for all the tests. Once I have more confi

Re: Testing in Django - newbie questions on first test failure and coverage

2013-09-23 Thread Derek
; have found that recommend these be placed in a different directory: > > From http://toastdriven.com/blog/2011/apr/17/guide-to-testing-in-django-2/ > > "I prefer to split up the tests into a file structure that mirrors the > app's setup. To do this, we create a new tests directory

Re: Testing in Django - newbie questions on first test failure and coverage

2013-09-22 Thread Rafael Durán Castañeda
ast two places I have > found that recommend these be placed in a different directory: > > From http://toastdriven.com/blog/2011/apr/17/guide-to-testing-in-django-2/ > > "I prefer to split up the tests into a file structure that mirrors the app's > setup. To do th

Re: Testing in Django - newbie questions on first test failure and coverage

2013-09-21 Thread Derek
: >From http://toastdriven.com/blog/2011/apr/17/guide-to-testing-in-django-2/ "I prefer to split up the tests into a file structure that mirrors the app's setup. To do this, we create a new tests directory then move the existing tests.py into tests/views.py." From

Re: Testing in Django - newbie questions on first test failure and coverage

2013-09-16 Thread Rafael Durán Castañeda
Hi, Some answers inline and links at the end: 2013/9/15 Derek > I have an existing Django (1.4) project, with multiple apps and extensive > business logic, that I need to write tests for. Based on a day or two of > reading of the core Django docs and numerous blogs (each of which go about > th

Testing in Django - newbie questions on first test failure and coverage

2013-09-15 Thread Derek
I have an existing Django (1.4) project, with multiple apps and extensive business logic, that I need to write tests for. Based on a day or two of reading of the core Django docs and numerous blogs (each of which go about things subtly differently!?), I have made a start. As part of the seeming "

Re: Unit testing in django without using test client

2010-09-17 Thread Paul Winkler
On Fri, Sep 17, 2010 at 10:58:19AM +0530, girish shabadimath wrote: > hi Paul, > > thanks for d reply,,,but im new to python n django,,,dint do ne python unit > testing before,,can u plz give me some links or hints to start with... http://docs.djangoproject.com/en/1.2/topics/testing/ has plenty

Re: Unit testing in django without using test client

2010-09-17 Thread Paul Winkler
On Fri, Sep 17, 2010 at 10:58:19AM +0530, girish shabadimath wrote: > hi Paul, > > thanks for d reply,,,but im new to python n django,,,dint do ne python unit > testing before,,can u plz give me some links or hints to start with... http://docs.djangoproject.com/en/1.2/topics/testing/ has plenty

Re: Unit testing in django without using test client

2010-09-17 Thread Carlton Gibson
Hi Girish, On 17 Sep 2010, at 06:28, girish shabadimath wrote: > thanks for d reply,,,but im new to python n django,,,dint do ne python unit > testing before,,can u plz give me some links or hints to start with... IN that case I'd recommend this book: http://www.amazon.com/Django-Testing-Deb

Re: Unit testing in django without using test client

2010-09-16 Thread girish shabadimath
hi Paul, thanks for d reply,,,but im new to python n django,,,dint do ne python unit testing before,,can u plz give me some links or hints to start with... On Thu, Sep 16, 2010 at 8:09 PM, Paul Winkler wrote: > On Sep 16, 10:11 am, girish shabadimath > wrote: > > thanks for reply, > > actually

Re: Unit testing in django without using test client

2010-09-16 Thread Paul Winkler
On Sep 16, 10:11 am, girish shabadimath wrote: > thanks for reply, > actually i used unit test to test urls and other view functions,,,there is a > module called Client() in django which acts as a browser to test urls,,, > > my problem is ,i want to test other methods in my project,,, how to do >

Re: Unit testing in django without using test client

2010-09-16 Thread girish shabadimath
thanks for reply, actually i used unit test to test urls and other view functions,,,there is a module called Client() in django which acts as a browser to test urls,,, my problem is ,i want to test other methods in my project,,, how to do so, without making use of django's test client..?.. O

Re: Unit testing in django without using test client

2010-09-16 Thread Shawn Milochik
You can use Python's unittest module to test any Python code (including Django code). What is it about Django's test client or TestCase class that is a problem for you? Shawn -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gr

Unit testing in django without using test client

2010-09-16 Thread girish shabadimath
hi,,, i need to do unit testing in one of d django project, is there any other way to test functions ( or methods ) without using test client..? -- Girish M S -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email t

Re: Unit Testing in Django.

2009-10-06 Thread veasna bunhor
I have been test it, but it's seem not to be clear to involve into the real project. Could you let me know the other example? On Tue, Oct 6, 2009 at 6:01 PM, Daniel Roseman wrote: > > On Oct 6, 11:55 am, veasna bunhor wrote: > > Do you know how to use unit testing in django ?

Re: Unit Testing in Django.

2009-10-06 Thread Daniel Roseman
On Oct 6, 11:55 am, veasna bunhor wrote: > Do you know how to use unit testing in django ? Could you please give me an > example? > > Thanks in advanced, http://docs.djangoproject.com/en/dev/topics/testing/ -- DR --~--~-~--~~~---~--~~ You received

Re: Unit Testing in Django.

2009-10-06 Thread Russell Keith-Magee
On Tue, Oct 6, 2009 at 6:55 PM, veasna bunhor wrote: > Do you know how to use unit testing in django ? Could you please give me an > example? There's a link to docs labled "Testing: Overview" on the homepage of the documentation. http://docs.djangoproject.com/en/dev/t

Unit Testing in Django.

2009-10-06 Thread veasna bunhor
Do you know how to use unit testing in django ? Could you please give me an example? Thanks in advanced, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, sen

Re: Implementing A/B Testing in Django

2009-05-18 Thread John Boxall
Using template_loader idea I've developed a little pluggable app for conducting basic A/B tests. You can grab it here: http://github.com/johnboxall/django-ab/tree/master John On May 16, 9:04 pm, John Boxall wrote: > I've got a new home page and I'd like to test it's performance in > getting us

Re: Implementing A/B Testing in Django

2009-05-18 Thread John Boxall
Thanks Tino, I am aware of GWO - just thought it would be a cool project to try! It looks like the local threads / request object available in the template loader trick is going to work - just gotta clear up some possible caching issues then it'll be ready for release. Cheers, John On May 17,

Re: Implementing A/B Testing in Django

2009-05-17 Thread TiNo
> > Does anyone have any other ideas or suggestions about how to > dynamically show templates to users in a pluggable way while at the > same time measuring what template the user sees? > It's not about doing it in Django, but you know that Google Website Optimizer does this, and provides you out

Implementing A/B Testing in Django

2009-05-16 Thread John Boxall
I've got a new home page and I'd like to test it's performance in getting users to sign up compared to my existing home page. In Django terms I have two templates that I would like my existing view to alternate between - I want to make whatever template the viewer sees "sticky" - they see the sam