Re: Testing my Django App

2020-03-23 Thread Motaz Hejaze
Delete the sqlite database and migrate again to remake it On Mon, 23 Mar 2020, 7:56 pm victor awakan, wrote: > Check your book.user_id. It shouldn’t be null. That’s what the last error > is saying. > > On Mon 23. Mar 2020 at 17.44, Ejike Enyinnaya > wrote: > >> Good day All, >> >> I am

Re: Testing my Django App

2020-03-23 Thread victor awakan
Check your book.user_id. It shouldn’t be null. That’s what the last error is saying. On Mon 23. Mar 2020 at 17.44, Ejike Enyinnaya wrote: > Good day All, > > I am currently running a test for my Django app call 'Books'. > > Anytime I run an INDEX test, I get the following error below: > > "File

Testing my Django App

2020-03-23 Thread Ejike Enyinnaya
Good day All, I am currently running a test for my Django app call 'Books'. Anytime I run an INDEX test, I get the following error below: "File "/Users/macbookpro/.local/share/virtualenvs/first_django_app-mymO4nCn/lib/python3.7/site-packages/django/db/backends/sqlite3/base.py", line 396, in

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')

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

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: Testing a Django library

2017-03-23 Thread Josh Crompton
There's no Django community standard of which I'm aware for doing this. There *is* a standard way to run tests for Python projects which use setuptools (which yours should do if you want people to be able to `pip install` it) [1]. I usually do something like this blog post describes [2]. Or,

Re: Testing a Django library

2017-03-22 Thread Jani Tiainen
Hi, Tox is quite neat test wrapper makes which easy to test code against multiple versions of Python and Django. On 21.03.2017 00:38, th...@copperleaf.com wrote: I am working on a Django library (which will be packaged) and want to set up testing for it. Looking at a number of existing

Re: Testing a Django library

2017-03-21 Thread Avraham Serour
What are the different approaches you found? I created a simple minimal project inside the tests folder On Mar 21, 2017 9:59 PM, "bobhaugen" wrote: > Very interesting topic. We will be facing the same problem soon, and will > hope to learn from your experience. Got a

Re: Testing a Django library

2017-03-21 Thread bobhaugen
Very interesting topic. We will be facing the same problem soon, and will hope to learn from your experience. Got a code repository yet? We're at https://github.com/django-rea If and when we have some good answers, I'll report back here. -- You received this message because you are subscribed

Testing a Django library

2017-03-20 Thread thauk
I am working on a Django library (which will be packaged) and want to set up testing for it. Looking at a number of existing Django libraries, here seem to be a number of ways to set up testing, and all of them are different. Are there any best practices? Is there a guide that specifies how it

Re: Unit testing in django for django template

2016-10-12 Thread ludovic coues
s/testing/tools/#testing-responses > > -James > > On Wed, Oct 12, 2016 at 12:17 PM, <codemaster...@gmail.com> wrote: >> >> How to Unit testing in django for django template >> >> please any one help me??? >> >> -- >> You received this

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, <codemaster...@gmail.com> wrote: > How to Unit testing in django for django template >

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
that each type/combo is processed correctly. On Saturday, 27 February 2016 15:23:05 UTC+2, 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 received this message

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" <vickyrahul...@gmail.com> wrote: > I need to use selenium automated testing for django application with input > from excel sheet. How t

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 e

Testing Migrations (django 1.7)?

2015-03-16 Thread Sean Briceland
Hi all, Previous to Django 1.7, I had a nifty solution for testing south Migrations. I'd basically get a list of migrations for an app via: migrations = Migrations('some_app') Then to get the ORM at a given point in migrations: orm_at_migration = migrations['000X_name_of_migration'].orm() I

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

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

2013-09-23 Thread Derek
s 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 this, we create a new

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

2013-09-22 Thread Rafael Durán Castañeda
ssue of test file locations - there are least 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 ap

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 https

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

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: testing a django package

2012-09-13 Thread Jonas Geiregat
t > >> > >> Hope this helps! > >> > >> Thomas > >> > >> On Sep 10, 2012 5:23 PM, "Jonas Geiregat" <jo...@geiregat.org> wrote: > >>> > >>> Hello, > >>> > >>> I've created

Re: testing a django package

2012-09-13 Thread Jonas Geiregat
Thanks you for your help. I understand now how I should setup testing for a django package. I'm using django-registration as an example , which works a similar way. I have a weird problem at hand. I'm creating a django package and would like to provide some test cases for it. The package

Re: testing a django package

2012-09-12 Thread Thomas Orozco
<jo...@geiregat.org> > wrote: > >>> > >>> Hello, > >>> > >>> I've created a simple reusable django package. This package basically > >>> consists out of a views.py file, with some helper functions. > >>> >

Re: testing a django package

2012-09-12 Thread Jonas Geiregat
consists out of a views.py file, with some helper functions. >>> >>> I want to write some tests for what's in this file. This file contains a >>> mixin , so I probably can't test it directly. >>> >>> What's the best way to test a django package ? >&g

Re: testing a django package

2012-09-12 Thread Thomas Orozco
. >> >> What's the best way to test a django package ? >> >> Do I need to include some kind of example project that, uses my mixin and >> has tests files just as one would test a normal django application ? >> >> I've tried googling but, there's little about this.

Re: testing a django package

2012-09-12 Thread Jonas Geiregat
y >> consists out of a views.py file, with some helper functions. >> >> I want to write some tests for what's in this file. This file contains a >> mixin , so I probably can't test it directly. >> >> What's the best way to test a django package ? >> >>

Re: testing a django package

2012-09-11 Thread Jonas Geiregat
; mixin , so I probably can't test it directly. > > What's the best way to test a django package ? > > Do I need to include some kind of example project that, uses my mixin and has > tests files just as one would test a normal django application ? > > I've tried googling but, the

Re: testing a django package

2012-09-11 Thread Thomas Orozco
there's little about this. Most of the things > I've found where related to testing actual django applications. > > Any help is appreciated. > > Jonas > > > -- > You received this message because you are subscribed to the Google Groups > "Django users"

testing a django package

2012-09-10 Thread Jonas Geiregat
a django package ? Do I need to include some kind of example project that, uses my mixin and has tests files just as one would test a normal django application ? I've tried googling but, there's little about this. Most of the things I've found where related to testing actual django applications. Any

how to emulate parallel multi-user usability testing with django and selenium/grid?

2012-04-24 Thread Tony Schmidt
I can get my Selenium tests running fine for one user/ sequentially on Django 1.4 using LiveServerTestCase, but I would like to emulate parallel multi-user testing. I don't think I need real load testing,

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-T

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

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

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..?..

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

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

Re: any suggestion about how to build Continuous testing for django project?

2010-02-02 Thread Simon Brunning
On 1 February 2010 17:25, pyleaf <lg.feixi...@gmail.com> wrote: > I am new for django. > any suggestion about how to build Continuous testing for django project? If you build your Django app with buildout (<http://bit.ly/cmdMQy>) you could try Hudson (<http://bit.l

Re: any suggestion about how to build Continuous testing for django project?

2010-02-02 Thread timc3
Or you could try BuildBot. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more

Re: any suggestion about how to build Continuous testing for django project?

2010-02-02 Thread Phlip
pyleaf wrote: > what about bitten? I can't find a screenshot. Can it compete with this? http://c0485891.cdn.cloudfiles.rackspacecloud.com/620ad37c-398d-4509-ae45-b88399c1c4a6_2_full.jpeg Also note that _none_ of those should be red. I'm sure the crew only broke them just to illustrate the

Re: any suggestion about how to build Continuous testing for django project?

2010-02-01 Thread pyleaf
what about bitten? On Tue, Feb 2, 2010 at 4:12 AM, Phlip <phlip2...@gmail.com> wrote: > pyleaf wrote: > > > I am new for django. > > any suggestion about how to build Continuous testing for django project? > > install fabric - and don't worry about its rem

Re: any suggestion about how to build Continuous testing for django project?

2010-02-01 Thread Phlip
pyleaf wrote: > I am new for django. > any suggestion about how to build Continuous testing for django project? install fabric - and don't worry about its remote options yet. Then create a fabfile.py at the root of your app. Create 3 targets; pull, test, and int. They pull from Git (you

any suggestion about how to build Continuous testing for django project?

2010-02-01 Thread pyleaf
I am new for django. any suggestion about how to build Continuous testing for django project? -- Believing is Everything. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@google

Re: Unit Testing in Django.

2009-10-06 Thread veasna bunhor
gt; > 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 rec

Re: Unit Testing in Django.

2009-10-06 Thread Daniel Roseman
On Oct 6, 11:55 am, veasna bunhor <veasnat...@gmail.com> 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 --~--~-~--~~~--

Re: Unit Testing in Django.

2009-10-06 Thread Russell Keith-Magee
On Tue, Oct 6, 2009 at 6:55 PM, veasna bunhor <veasnat...@gmail.com> 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.dj

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,

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

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

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

Re: automated testing of django apps via browser

2007-06-03 Thread Russell Keith-Magee
On 6/4/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Has anybody experience in selenium and django ? > > During ./manage test there are mechanism to load fixtures, which I tried to > use. During first tests with selenium I need to run ./manage runserver on my > test system. Since the

automated testing of django apps via browser

2007-06-03 Thread dummy
Hi all, I currently working on an company application which needs a lot of automated tests to make sure that changes on code won't break usability for out production environment. I wrote doctests for our models via models.py. I wrote small application tests via TestCases. Until now I have