Re: Setting up a system for testing by users (tables are tables?)

2018-08-10 Thread guettli
I see: no reply. Why? Am Mittwoch, 18. Juli 2018 11:45:00 UTC+2 schrieb guettli: > > I have a task which looks simple at the first sight: > > Setting up a system for testing by users. > > In my case it is a custom issue tracking system. > > The users who should do

Re: response.status 404 testing problem

2018-08-06 Thread Mike Dewhirst
Had a thought overnight ... maybe the 301 (permanently redirected) is because the staging server is using https and the server redirects from http to https. I'll start looking there. If anyone has any advice on best practice for this I'd love to hear it. Thanks Mike On 6/08/2018 2:08 PM, Mi

Re: response.status 404 testing problem

2018-08-05 Thread Mike Dewhirst
Forgot to mention ... dev = Django 1.11.15, Python 3.6 and 2.7 on Windows 10 staging = Django 1.11.15, Python 2.7 on Ubuntu 16.04 (no GUI) Apache 2.4 Sorry Mike On 6/08/2018 1:44 PM, Mike Dewhirst wrote: I have a test which succeeds in development but fails with Apache in staging ... Here i

response.status 404 testing problem

2018-08-05 Thread Mike Dewhirst
I have a test which succeeds in development but fails with Apache in staging ... Here is the test ...     def test_course_view_not_found_status_code(self):         # no course exists with pk of 99     response = self.client.get(reverse('course:course_view', kwargs={'pk': 99}))     sel

Setting up a system for testing by users (tables are tables?)

2018-07-18 Thread guettli
I have a task which looks simple at the first sight: Setting up a system for testing by users. In my case it is a custom issue tracking system. The users who should do the testing say "The new system should be like the production system." If this would be true, then dump+rest

queryset appears empty in debugger during testing, but not in console

2018-06-18 Thread mccc
Hello, I'm testing REST APIs with rest_framework.test.APITestCase, using their client for making requests and model_mommy for creating objects in the setUp() method. The general working is quite simple: the view is supposed to fetch a User and an object, and assign permissions for the f

Definitive (or any) guide to testing Django admin actions with intermediate pages?

2018-05-28 Thread Derek
essages framework. ** for purpose of this question, its safe to assume that all logic for the action is included in it as a single whole. Any help with this is appreciated - its the one part of testing that just eludes me. Derek -- You received this message because you are subscribed to the Goo

Re: Unit testing models.py

2018-05-14 Thread Melvyn Sopacua
Hi Mark, On zondag 13 mei 2018 18:11:07 CEST Mark Phillips wrote: > What should be unit tested in models.py? I assume the storing of data and > retrieving of data from the database does not need to be tested, as I > further assume django has a full set of tests for those operations. You should te

Re: Unit testing models.py

2018-05-13 Thread 'Anthony Flury' via Django users
I would agree with that - test any custom functionality - * Custom methods (including __str__ and __repr__) * custom managers * Triggers (that maybe save custom fields on update) * validations - testing to ensure that the right validation is performed on that field - i.e. you linked the

Re: Unit testing models.py

2018-05-13 Thread Jani Tiainen
e: > What should be unit tested in models.py? I assume the storing of data and > retrieving of data from the database does not need to be tested, as I > further assume django has a full set of tests for those operations. > > I can see testing these parts of models.py > > * All

Unit testing models.py

2018-05-13 Thread Mark Phillips
What should be unit tested in models.py? I assume the storing of data and retrieving of data from the database does not need to be tested, as I further assume django has a full set of tests for those operations. I can see testing these parts of models.py * All custom methods * Labels for all

Re: [django-channels] Testing events from post_save signal

2018-02-25 Thread Tomáš Ehrlich
Kudos for you and all contributors! It’s really amazing. I’m going to send few PRs to django-channels as a payback :) Cheers, Tom > 25. 2. 2018 v 19:46, Andrew Godwin : > > No problem - glad everything else seems to work alright! Getting async > testing working well has been

Re: [django-channels] Testing events from post_save signal

2018-02-25 Thread Andrew Godwin
No problem - glad everything else seems to work alright! Getting async testing working well has been a long, hard road :) Andrew On Sun, Feb 25, 2018 at 10:37 AM, Tomáš Ehrlich wrote: > Of course! > > It works now perfectly, thank you. Sorry I missed that in docs. > > Cheers,

Re: [django-channels] Testing events from post_save signal

2018-02-25 Thread Tomáš Ehrlich
Of course! It works now perfectly, thank you. Sorry I missed that in docs. Cheers, Tom > 25. 2. 2018 v 19:12, Andrew Godwin : > > I think the change you need to make is swapping in database_sync_to_async > rather than sync_to_async - see here: > http://channels.readthedocs.io/en/latest/top

Re: [django-channels] Testing events from post_save signal

2018-02-25 Thread Andrew Godwin
I think the change you need to make is swapping in database_sync_to_async rather than sync_to_async - see here: http://channels.readthedocs.io/en/latest/topics/databases.html Andrew On Sun, Feb 25, 2018 at 7:14 AM, Tomáš Ehrlich wrote: > Here's the gist (https://gist.github.com/tricoder42/ > af

Re: [django-channels] Testing events from post_save signal

2018-02-25 Thread Tomáš Ehrlich
Here's the gist (https://gist.github.com/tricoder42/af3d0337c1b33d82c1b32d12bd0265ec) with consumer. Dne neděle 25. února 2018 15:37:19 UTC+1 Tomáš Ehrlich napsal(a): > > Hello, > I’ve just migrated my project to django-channels 2.x. Thanks to everyone > involved! > > I’m trying to write a test

[django-channels] Testing events from post_save signal

2018-02-25 Thread Tomáš Ehrlich
Hello, I’ve just migrated my project to django-channels 2.x. Thanks to everyone involved! I’m trying to write a test for a consumer. I have a post_save signal receiver, which sends a message to a group. As I understand, I need to wrap `group_send` with `async_to_sync` because django signals can’

Re: Testing Channels 2.0 consumers - problem with routing

2018-02-11 Thread Andrew Godwin
hy url_route is not there. I rewrote my group_name code >>> to use path instead and now this part works. >>> >>> There is a new error though, during disconnect, when calling this part >>> of the test: >>> >>> await communicator.disconnect()

Re: Testing Channels 2.0 consumers - problem with routing

2018-02-11 Thread Azamat Galimzhanov
icator.disconnect() >> >> >> Here is disconnect method of my consumer, but I think the problem isnt >> here: >> >> def disconnect(self): >> AsyncToSync(self.channel_layer.group_discard)(self.group_name, >> self.channel_name) >> >> >> This is the pytest output: >> >> > await communicator.disconnect() >> >> auctions/tests/test_consumers.py:18: >> _ _ _ _ _ _ _ _ _ _

Re: Testing Channels 2.0 consumers - problem with routing

2018-02-09 Thread Andrew Godwin
.channel_name) > > > This is the pytest output: > > > await communicator.disconnect() > > auctions/tests/test_consumers.py:18: > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > /home/khazidhea/.local/share/virtualenvs/django_root- &

Re: Testing Channels 2.0 consumers - problem with routing

2018-02-09 Thread Azamat Galimzhanov
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /home/khazidhea/.local/share/virtualenvs/django_root-FXsg3jFU/lib/python3.6/site-packages/channels/testing/websocket.py:100: in disconnect await self.future /home/khazidhea/.local/share/virtualenvs/django_root-FXsg3jFU/lib/python3.6

Re: Testing Channels 2.0 consumers - problem with routing

2018-02-07 Thread Andrew Godwin
I'm not going to address the mocking, as there's subtle details there (e.g. you mocked group_name as a non-property, I think), but look at the main issue. Can you make your code print out what _is_ in `self.scope`? url_route should definitely be in there, but I am curious what it looks like if it

Testing Channels 2.0 consumers - problem with routing

2018-02-07 Thread Azamat Galimzhanov
Hello, I'm setting up an auctions application using channels and websockets. When I'm running the server the code works just fine, troubles arise when I'm trying to test my app. asgiref==2.1.3 daphne==2.0.2 Django==2.0.2 channels==2.0.1 channels-redis==2.0.2 pytest==3.4.0 pytest-asyncio==0.8.0

Re: Testing Channels database data missing in Consumer

2018-02-07 Thread Andrew Godwin
Interesting. I did note that you called ORM methods in an async context, which is not how you are supposed to do it, but I also believe that should work. Maybe try splitting the ORM methods into a separate function and awaiting it using SyncToAsync? As for the staticfiles in live test case problem

Re: Testing Channels database data missing in Consumer

2018-02-07 Thread Daniel Gilge
Hi Andrew, thanks for your reply. This test is passing (using the same packages): def test_fixture(db_with_segment, admin_client): assert models.MyModel.objects.count() == 1 response = admin_client.get('/api/my_model/list/') assert len(response.json()['results']) == 1 I tried to wri

Re: Testing Channels database data missing in Consumer

2018-02-06 Thread Andrew Godwin
I'm not quite sure either. Does the test setup work if you are not in async mode? Andrew On Tue, Feb 6, 2018 at 9:45 AM, Daniel Gilge wrote: > Hi, > > this question is related to Channels 2.0, Django 2.0, pytest 3.4, > pytest-django 3.1 and pytest-asyncio 0.8. > > I created a pytest: > > @pytes

Testing Channels database data missing in Consumer

2018-02-06 Thread Daniel Gilge
Hi, this question is related to Channels 2.0, Django 2.0, pytest 3.4, pytest-django 3.1 and pytest-asyncio 0.8. I created a pytest: @pytest.fixture def db_with_obj(db): factories.MyModelFactory() @pytest.mark.asyncio async def test_something(db_with_obj): print(models.MyModelFactory.ob

Re: Testing

2018-01-14 Thread yingi keme
Yes it does post Yingi Kem > On 14 Jan 2018, at 10:07 PM, Rich Shepard wrote: > > I've not received messages from this mail list since last summer. I now > have a need to communicate with others and learned that I'm still subscribed > so I want to learn if this message posts and is sent back t

Testing

2018-01-14 Thread Rich Shepard
I've not received messages from this mail list since last summer. I now have a need to communicate with others and learned that I'm still subscribed so I want to learn if this message posts and is sent back to me by the MLM. Rich -- You received this message because you are subscribed to the G

Re: İ want to setup a server at home for testing and lerning to deploy django projects, thanks for any helping.

2017-12-02 Thread Derek
mail.com > > *Sent:* Friday, December 1, 2017 4:20:53 PM > *To:* django...@googlegroups.com > *Subject:* Re: İ want to setup a server at home for testing and lerning > to deploy django projects, thanks for any helping. > > For a typical setup, a VM (using VirtualBox or

Re: İ want to setup a server at home for testing and lerning to deploy django projects, thanks for any helping.

2017-12-01 Thread Gerardo Palazuelos Guerrero
tlook <https://aka.ms/ghei36> uygulamasını edinin > > -- > *From:* django-users@googlegroups.com on > behalf of Vijay Khemlani > *Sent:* Friday, December 1, 2017 4:20:53 PM > *To:* django-users@googlegroups.com > *Subject:* Re: İ want to setup a

Re: İ want to setup a server at home for testing and lerning to deploy django projects, thanks for any helping.

2017-12-01 Thread Ali İNCE
Sent: Friday, December 1, 2017 4:20:53 PM To: django-users@googlegroups.com Subject: Re: İ want to setup a server at home for testing and lerning to deploy django projects, thanks for any helping. For a typical setup, a VM (using VirtualBox or similar) running the OS of your server should be eno

Re: İ want to setup a server at home for testing and lerning to deploy django projects, thanks for any helping.

2017-12-01 Thread Vijay Khemlani
For a typical setup, a VM (using VirtualBox or similar) running the OS of your server should be enough to test On Fri, Dec 1, 2017 at 2:39 AM, Ali İNCE wrote: > İ want to setup a server at home for testing and lerning to deploy django > projects, can anyone help me , advice and share s

İ want to setup a server at home for testing and lerning to deploy django projects, thanks for any helping.

2017-12-01 Thread Ali İNCE
İ want to setup a server at home for testing and lerning to deploy django projects, can anyone help me , advice and share sources thanks for all. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this grou

Guidance with testing reusable app the way Django does

2017-11-06 Thread Ramez Ashraf
Hello dear developers, I need your help in creating a test suit similar to Django's in the sense that tests are in separate folders (modules), each might contain models of their own. I cheated from the runtests.py Django have, edited out some warning and so. The problem is that the apps are not

Re: Problem testing user is None when extending auth backend.

2017-09-28 Thread graeme
>> The cause seemed clear, the parent classes method was run first with super >> and returned None when it failed to authenticate, so I tried to fix by >> testing whether user is None, but I still get this: >> >> >> if (user is not None) and user.is_authenticated() a

Re: Problem testing user is None when extending auth backend.

2017-09-28 Thread Derek
henticated() and user.is_staff: > AttributeError: 'NoneType' object has no attribute 'is_authenticated' > > > The cause seemed clear, the parent classes method was run first with super > and returned None when it failed to authenticate, so I tried to fix by > testing wh

Problem testing user is None when extending auth backend.

2017-09-28 Thread graeme
method was run first with super and returned None when it failed to authenticate, so I tried to fix by testing whether user is None, but I still get this: if (user is not None) and user.is_authenticated() and user.is_staff: AttributeError: 'NoneType' object has no attribute 'i

Re: Testing file upload via a form?

2017-09-10 Thread Derek
rieved and passed on to a processing method, and then the flow redirected to the right URL. I have got hung up on the "mechanics" of form testing instead of seeing that they only play a small role in the project. I will however, persist until I get the grammar correct. Derek On 3 Sep

Re: Testing file upload via a form?

2017-09-03 Thread Melvyn Sopacua
to use them. On top of that, you're testing your urls for free. So in general, a Django test suite consists of: * model tests * view tests using django.test.Client * template tests [3] * command tests [4] * utility tests Hope this helps, [1] https://docs.djangoproject.com/en/1.11/topics/db/ma

Re: Testing file upload via a form?

2017-09-03 Thread Derek
I have been looking for a decent guide that covers testing in a solid, thorough way - there are lots of fragmented pieces that cover bits-and-pieces of what is needed for tests but not all the cases with a start-to-end comprehensive approach for everything ("Obey the Testing Goat" com

Re: Testing file upload via a form?

2017-09-03 Thread James Schneider
upload and then the file processing itself : and those are the parts I need tests for. I'd have to agree with Melvin. You should be testing your view code as well, which would incorporate the tests for the form class. If the view is broken out interacts badly with the form for whatever reason, th

Re: Testing file upload via a form?

2017-09-01 Thread Derek
are the parts I need tests for. On 1 September 2017 at 17:12, Melvyn Sopacua wrote: > You're not using the test **Client** at all. You're testing the value > of a form.Form instance. > > The difference is that the test client constructs an actual request, > using the k

Re: Testing file upload via a form?

2017-09-01 Thread Melvyn Sopacua
You're not using the test **Client** at all. You're testing the value of a form.Form instance. The difference is that the test client constructs an actual request, using the known URLs. So you'd need a view and url as well. But these can exist only in the test and to be honest,

Re: Testing file upload via a form?

2017-09-01 Thread Derek
Thanks James, I will try that. On 1 September 2017 at 09:27, James Schneider wrote: > > > On Aug 29, 2017 11:49 AM, "Derek" wrote: > > (Python 3.5 and Django 1.10) > > I am trying to test a Django form that enables a required file upload. > > The form is very simple and includes a field that lo

Re: Testing file upload via a form?

2017-09-01 Thread James Schneider
On Aug 29, 2017 11:49 AM, "Derek" wrote: (Python 3.5 and Django 1.10) I am trying to test a Django form that enables a required file upload. The form is very simple and includes a field that looks like: upload_file = forms.FileField() The corresponding test to try and check the upload: d

Re: Testing file upload via a form?

2017-09-01 Thread Derek
the documentation of the test client > <https://docs.djangoproject.com/en/1.11/topics/testing/tools/#django.test.Client.post> > it > is all spelled out how to test file uploads. > ​ > ​ > > On Tue, Aug 29, 2017 at 8:48 PM, Derek wrote: > >> (Python 3.5 and Django 1

Re: Testing file upload via a form?

2017-08-31 Thread Melvyn Sopacua
​In the documentation of the test client <https://docs.djangoproject.com/en/1.11/topics/testing/tools/#django.test.Client.post> it is all spelled out how to test file uploads. ​ ​ On Tue, Aug 29, 2017 at 8:48 PM, Derek wrote: > (Python 3.5 and Django 1.10) > > I am trying to tes

Testing file upload via a form?

2017-08-29 Thread Derek
(Python 3.5 and Django 1.10) I am trying to test a Django form that enables a required file upload. The form is very simple and includes a field that looks like: upload_file = forms.FileField() The corresponding test to try and check the upload: def test_form_validation_with_file(self):

Re: Getting response code 302 instead of 200 while testing a url

2017-07-31 Thread Mannu Gupta
Hi James, Thanks for the reply! As in the setup function for my tests i have already created a Post object then how just visiting a url i.e '/update/' and 'delete/' of that object can be a considered 'POST' request. Also Is there any way to capture the inbetween changing process of status code i

Re: Getting response code 302 instead of 200 while testing a url

2017-07-27 Thread James Schneider
The problem here is that my test cased passed for the first 2 functions i.e. "test_post_list" and "test_post_create" but now working for other two test functions i.e "test_post_update" and "test_post_delete". What might be the problem ? The setup function that i made is supposed to create a object

Getting response code 302 instead of 200 while testing a url

2017-07-27 Thread Mannu Gupta
I have a django named blog and trying to test the url. The code for testing is :- class PostTests(TestCase): def setUp(self): self.user = get_user_model().objects.create(username='some_user') self.title = "test-title" Post.objects.create(

Testing UpdateView in Django using Unittest

2017-07-27 Thread Mannu Gupta
I am writing a test case for my Django application named "blog". I am getting the following errors :- 1. I am testing my view function i.e PostUpdateview the code is class PostUpdateView(LoginRequiredMixin, UserOwnerMixin, UpdateView): model = Post form_class = Pos

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
tests. It's fine to repeat the same code again and again when testing. Regards, A. Antonis Christofides http://djangodeployment.com On 2017-05-23 10:07, Akash Tomar wrote: > class SignUpTest(TestCase): > def test_createAccount(self): > my_data = {'username': 'akash

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 Multiselect fields not loading as expected

2017-05-08 Thread Trevor Woolley
data from > your production database when running tests?" note in ​this section [0]. > > [0] https://docs.djangoproject.com/en/dev/topics/testing/ > overview/#the-test-database > > > On Sunday, May 7, 2017 at 9:05:09 PM UTC-4, Trevor Woolley wrote: >> >> Fu

Re: Unit testing Multiselect fields not loading as expected

2017-05-08 Thread Tim Graham
e in ​this section [0]. [0] https://docs.djangoproject.com/en/dev/topics/testing/overview/#the-test-database On Sunday, May 7, 2017 at 9:05:09 PM UTC-4, Trevor Woolley wrote: > > Further investigation shows this as failing outside of a test scenario, > and the "my_choices" is not being updated, u

Re: Unit testing Multiselect fields not loading as expected

2017-05-07 Thread Trevor Woolley
Further investigation shows this as failing outside of a test scenario, and the "my_choices" is not being updated, unless the server (be that the ./manage.py runserver" or a production apache server) is restarted. Rgds Trevor On Friday, May 5, 2017 at 3:20:04 PM UTC+10, Trevor Woolley wrote: >

Unit testing Multiselect fields not loading as expected

2017-05-04 Thread Trevor Woolley
Hi, when I run a unittest on a form containing a MultipleChoiceField, and in the unittest I test setting what I think should be a valid field, it does not pass. It appears that field in question extracts the data is uses for the test before the test database is created, and actually uses the pr

Testing Django Admin with Selenium

2017-04-16 Thread Derek
Python 3.5; Django 1.10.7 I am struggling to get access to the admin pages via Selenium. I assume the issue is with the user login not being set properly - I don't want to go via the login page/form every time, so was attempting the session approach. Below is the code that shows the problem. Th

Re: Testing client's force_login method doesn't seem to be logging in.

2017-03-26 Thread Quentin Fulsher
Actually I just fixed it, You have to save the model after you set the password. On Sunday, March 26, 2017 at 2:35:08 PM UTC-7, Quentin Fulsher wrote: > > I'm trying to write a test case for the viewing permissions on a certain > webpage. I'm trying to get the client to force_login as a user to

Testing client's force_login method doesn't seem to be logging in.

2017-03-26 Thread Quentin Fulsher
I'm trying to write a test case for the viewing permissions on a certain webpage. I'm trying to get the client to force_login as a user to test if they can get the view or not. The issue is that my client doesn't seem to be logged in. No matter who I try to login as (There are a few different t

Re: Testing a Django library

2017-03-23 Thread Josh Crompton
03/test-reusable-django-application-support-multiple-/ [3] https://github.com/pydanny/cookiecutter-djangopackage On Tuesday, 21 March 2017 09:38:41 UTC+11, th...@copperleaf.com wrote: > > I am working on a Django library (which will be packaged) and want to set > up testing for it. Look

Re: Testing a Django library

2017-03-21 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 code repository yet? > We'

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 to

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: browser testing

2017-01-05 Thread Mike Dewhirst
makes it better suited to professional testers than, say, random client representatives doing UAT. On Wed, Jan 4, 2017 at 6:30 PM, Mike Dewhirst <mailto:mi...@dewhirst.com.au>> wrote: Does anyone have any recommendations for testing via the browser? I have heard Selenium men

Re: browser testing

2017-01-05 Thread Antonis Christofides
representatives doing UAT. > > On Wed, Jan 4, 2017 at 6:30 PM, Mike Dewhirst <mailto:mi...@dewhirst.com.au>> wrote: > > Does anyone have any recommendations for testing via the browser? > > I have heard Selenium mentioned and saw a feature contrast between &g

Re: browser testing

2017-01-04 Thread Mike Dewhirst
irst <mailto:mi...@dewhirst.com.au>> wrote: Does anyone have any recommendations for testing via the browser? I have heard Selenium mentioned and saw a feature contrast between Selenium and Imacro which indicated Imacro is the best choice. Before I do the right thing and dig into

Re: browser testing

2017-01-04 Thread Alex Heyden
nce in relative difficulty between the two. Selenium has a learning curve that makes it better suited to professional testers than, say, random client representatives doing UAT. On Wed, Jan 4, 2017 at 6:30 PM, Mike Dewhirst wrote: > Does anyone have any recommendations for testing via the browser

browser testing

2017-01-04 Thread Mike Dewhirst
Does anyone have any recommendations for testing via the browser? I have heard Selenium mentioned and saw a feature contrast between Selenium and Imacro which indicated Imacro is the best choice. Before I do the right thing and dig into it myself, are there any war stories or testimonials out

Re: Tutorial 5 (Testing) seems to have an error

2016-12-28 Thread Nicolai Bjerre Pedersen
Hi Eric, Did you find the bug? I have the same issue running python 2.7.12 and django 1.10.4 Den mandag den 15. februar 2016 kl. 20.02.55 UTC+1 skrev Tim Graham: > > It looks like you have a Python path problem or that your project isn't > structured correctly such that the model is being regis

Re: Tutorial 5 (Testing) seems to have an error

2016-12-28 Thread Nicolai Bjerre Pedersen
I figured it out. I had to either delete __init__.py in my root directory (where manage.py is located) or call python manage.py polls.tests instead of just python manage.py polls Den mandag den 15. februar 2016 kl. 20.02.55 UTC+1 skrev Tim Graham: > > It looks like you have a Python path problem

Re: Headless testing

2016-10-12 Thread Mike Dewhirst
<mailto:nathan.daniel...@gmail.com>> wrote: Hi all, Wondering if anyone has an suggestions for headless django testing - any configuration tips or links would be helpful. My site is django 1.8 and we make extensive use of jquery on the frontend. Using phantomjs dr

Re: Headless testing

2016-10-12 Thread Avraham Serour
either set up this on your own or use https://saucelabs.com/ as a service On Wed, Oct 12, 2016 at 10:22 PM, Nathan wrote: > Hi all, > > Wondering if anyone has an suggestions for headless django testing - any > configuration tips or links would be helpful. > > My site is djan

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

Headless testing

2016-10-12 Thread Nathan
Hi all, Wondering if anyone has an suggestions for headless django testing - any configuration tips or links would be helpful. My site is django 1.8 and we make extensive use of jquery on the frontend. Using phantomjs driver with liveserver test hasn't worked out well. -- You received

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: Testing a reusable app which uses a database

2016-10-03 Thread Victor Porton
Well, I did it. On Monday, October 3, 2016 at 10:41:59 PM UTC+3, Victor Porton wrote: > > I try to make a reusable app which uses transaction.atomic(). > > When I run my test.py (below) for my reusable app, I get the below errors. > > Is it possible to test this reusable app outside of a Django pr

Re: Testing a reusable app which uses a database

2016-10-03 Thread Carl Meyer
On 10/03/2016 01:41 PM, Victor Porton wrote: > I try to make a reusable app which uses transaction.atomic(). > > When I run my test.py (below) for my reusable app, I get the below errors. > > Is it possible to test this reusable app outside of a Django project? It is not possible to test it with

Testing a reusable app which uses a database

2016-10-03 Thread Victor Porton
I try to make a reusable app which uses transaction.atomic(). When I run my test.py (below) for my reusable app, I get the below errors. Is it possible to test this reusable app outside of a Django project? [[[ import unittest from transaction_utils.transaction import retry class TestRetry(uni

Re: Testing if a view have an html element with at least one attribute

2016-08-03 Thread Fred Stluka
>> >> >> Hello, >> >> >> >> >> >> I am trying to test if a view is displaying a form with an input >> >> >> element with name=username. >> >>

Re: Testing an object

2016-08-01 Thread Neil Hunt
of the tutorial > and > > I've written a new models file. Make migrations works okay with the new > > models. I tried testing these new models using the test below and the > > console came up with an attribute error. Did I make a stupid mistake > > somewhere? A

Re: Testing an object

2016-08-01 Thread ludovic coues
ct and copied what was on the first two pages of the tutorial and > I've written a new models file. Make migrations works okay with the new > models. I tried testing these new models using the test below and the > console came up with an attribute error. Did I make a stupid mistake >

Testing an object

2016-08-01 Thread Neil Hunt
tions works okay with the new models. I tried testing these new models using the test below and the console came up with an attribute error. Did I make a stupid mistake somewhere? Any help would be much appreciated. Traceback (most recent call last): File "/home/DJapps/banking/mybank/bankin

Re: Testing if a view have an html element with at least one attribute

2016-07-31 Thread Andreas Kuhne
t if the django form is > rendered > >> >> in the view, not if the view is displaying a suitable form. > >> >> > >> >> 2016-07-31 13:22 GMT+02:00 Andreas Kuhne >: > >> >> > 2016-07-31 12:38 GMT+02:00 ludovic coues : > >>

Re: Testing if a view have an html element with at least one attribute

2016-07-31 Thread ludovic coues
ne : >> >> > 2016-07-31 12:38 GMT+02:00 ludovic coues : >> >> >> >> >> >> Hello, >> >> >> >> >> >> I am trying to test if a view is displaying a form with an input >> >> >> element with name=userna

Re: Testing if a view have an html element with at least one attribute

2016-07-31 Thread Andreas Kuhne
am trying to test if a view is displaying a form with an input > >> >> element with name=username. > >> >> > >> >> Currently, I have tried a lot of variation around > >> >> `self.assertContains( response, "", > >> >> htm

Re: Testing if a view have an html element with at least one attribute

2016-07-31 Thread ludovic coues
trying to test if a view is displaying a form with an input >> >> element with name=username. >> >> >> >> Currently, I have tried a lot of variation around >> >> `self.assertContains( response, "", >> >> html=True)` but none work

Re: Testing if a view have an html element with at least one attribute

2016-07-31 Thread Andreas Kuhne
gt; Currently, I have tried a lot of variation around > >> `self.assertContains( response, "", > >> html=True)` but none work. > >> I assume that doesn't work because the view have a field input with > >> name=username but also autofocus="",

Re: Testing if a view have an html element with at least one attribute

2016-07-31 Thread ludovic coues
se, "", >> html=True)` but none work. >> I assume that doesn't work because the view have a field input with >> name=username but also autofocus="", a class and a bunch of other >> attribute. >> >> I could extract the form from the context a

Re: Testing if a view have an html element with at least one attribute

2016-07-31 Thread Andreas Kuhne
none work. > I assume that doesn't work because the view have a field input with > name=username but also autofocus="", a class and a bunch of other > attribute. > > I could extract the form from the context and check the field username > from the form is displayed in

Testing if a view have an html element with at least one attribute

2016-07-31 Thread ludovic coues
h name=username but also autofocus="", a class and a bunch of other attribute. I could extract the form from the context and check the field username from the form is displayed in the view but I'm not ok with that solution. I'm testing if there is a input with name=username, not

Re: How make testing for a generated PDF file?

2016-07-21 Thread Avraham Serour
input -> function == expected output On Thu, Jul 21, 2016 at 4:37 PM, Seti Volkylany wrote: > > > -- > 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-u

How make testing for a generated PDF file?

2016-07-21 Thread Seti Volkylany
-- 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.

Re: Error in testing script

2016-07-11 Thread Gary Roach
On 07/10/2016 11:19 PM, Michal Petrucha wrote: On Sun, Jul 10, 2016 at 02:25:40PM -0700, Gary Roach wrote: On 07/10/2016 01:57 PM, Gary Roach wrote: Hi all; OS Debian Linux KDE desktop Django 1.9 Python 3.5 Working with tutorial https://docs.djangoproject.com/en/1.9/intro/tutorial05/ Writing

<    1   2   3   4   5   6   7   8   9   10   >