Re: Creating my first test case, failing.

2024-03-27 Thread Muhammad Juwaini Abdul Rahman
Obviously. You need to know how your routers generate the URL endpoint. After reading DRF, my best guess would be either 'courses-list' or 'course-list'. On Tuesday 26 March 2024 at 19:33:07 UTC+8 Filbert wrote: > *sigh* same error: > django.urls.exceptions.NoReverseMatch: Reverse for*

Re: Creating my first test case, failing.

2024-03-26 Thread Bayodele Oguntomiloye
Check your url. This error usually show up when there's no url with the name provided for the reverse function On Tue, Mar 26, 2024, 11:55 AM Filbert wrote: > Consider this what seems to be a simple Django/DRF API which works: > > class CourseViewSet(viewsets.ModelViewSet): > queryset =

Re: Creating my first test case, failing.

2024-03-26 Thread Gajanan Kathar
Use "basename" parameter while registering router. router.register(r'courses', CourseViewSet, basename="courses") And then reverse using this basename and operation like "courses-list". On Tue, 26 Mar, 2024, 17:03 Filbert, wrote: > *sigh* same error: > django.urls.exceptions.NoReverseMatch:

Re: Creating my first test case, failing.

2024-03-26 Thread Filbert
*sigh* same error: django.urls.exceptions.NoReverseMatch: Reverse for* 'courses-create' *not found. 'courses-create' is not a valid view function or pattern name. On Tuesday, March 26, 2024 at 7:28:45 AM UTC-4 Muhammad Juwaini Abdul Rahman wrote: > It's not reverse('courses') alone. Probably

Re: Creating my first test case, failing.

2024-03-26 Thread Muhammad Juwaini Abdul Rahman
It's not reverse('courses') alone. Probably reverse('courses-create') or something like that. On Tue, 26 Mar 2024 at 18:55, Filbert wrote: > Consider this what seems to be a simple Django/DRF API which works: > > class CourseViewSet(viewsets.ModelViewSet): > queryset = Course.objects.all() >

Creating my first test case, failing.

2024-03-26 Thread Filbert
Consider this what seems to be a simple Django/DRF API which works: class CourseViewSet(viewsets.ModelViewSet): queryset = Course.objects.all() serializer_class = CourseSerializer router = DefaultRouter() router.register(r'courses', CourseViewSet) urlpatterns = [ path('',

Re: Keeping/accessing the data Django generates during a test run

2023-12-05 Thread Juan diego Jacobo hernandez
need to modify the test script? > Thanks for your help. > > Le mercredi 13 février 2019 à 10:54:04 UTC+1, Anton Melser a écrit : > >> When you use django unittests commit is made as no-op. Use --keepdb and >>> at the end of your tests run SQL commit against your database cursor

Re: Keeping/accessing the data Django generates during a test run

2023-12-05 Thread dilo...@gmail.com
HelloI am running into the same problem but I do not understand what needs to be done. I use keepdb but how can I get the database cursor connection. Do I need to modify the test script? Thanks for your help. Le mercredi 13 février 2019 à 10:54:04 UTC+1, Anton Melser a écrit : > When you

question-test

2023-10-17 Thread 'RAUL OLAZAGOITIA' via Django users
Hi group I am reaching out to try and ask for django common issues. Can't see your comments on the group. can you 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

Re: Unit test to make sure correct template is returned from a specific URL?

2023-09-25 Thread Abhishek ozha
got some issues in unit test in django,could anypone have a look On Monday, September 25, 2023 at 7:28:31 PM UTC+5:45 Simon Connah wrote: > Thank you very much! > > --- Original Message --- > > On Monday, September 25th, 2023 at 14:07, Muhammad Juwaini Abdul Rahman <

Re: Unit test to make sure correct template is returned from a specific URL?

2023-09-25 Thread 'Simon Connah' via Django users
Sun, 24 Sept 2023 at 22:37, 'Simon Connah' via Django users > wrote: > > > I can write a unit test which checks say the title on a page and compares > > it to a string but that is really prone to breakage. What I want to do > > instead is to check that the template that is

Re: Unit test to make sure correct template is returned from a specific URL?

2023-09-25 Thread Muhammad Juwaini Abdul Rahman
Use assertTemplateUsed. https://docs.djangoproject.com/en/dev/topics/testing/tools/#django.test.SimpleTestCase.assertTemplateUsed On Sun, 24 Sept 2023 at 22:37, 'Simon Connah' via Django users < django-users@googlegroups.com> wrote: > I can write a unit test which checks say the title

Unit test to make sure correct template is returned from a specific URL?

2023-09-24 Thread 'Simon Connah' via Django users
I can write a unit test which checks say the title on a page and compares it to a string but that is really prone to breakage. What I want to do instead is to check that the template that is returned by the URL is the same one that is expected in the unit test. Is there an easy way to do

Re: Unit test is written but coverage report says there are missing statements

2023-01-13 Thread shahil joshi
when i am running the test its storing the inner functional data to main db not test db why ? On Monday, January 9, 2023 at 2:32:20 PM UTC+5:30 sencer...@gmail.com wrote: > Hi, > > I try to get coverage reports using a simple django model. > Unit test for model was written but

Anyone testing async views with django test client?

2022-09-20 Thread 'SP' via Django users
My async CBV works when accessed through my url endpoint with REQUESTS package. But with the django test client it seems to think the database doesn't contain the information I'm trying to pull using ORM. I've confirmed that the data DOES exist in the newly recreated DB (populated

Re: Having Trouble Creating a Test Database

2022-06-07 Thread Mark Phillips
Yes. All migrations have been done. On Tue, Jun 7, 2022, 9:01 AM Sebastian Jung wrote: > Do you have make manage.py migrate and afzer this manage.py makemigrations? > > Mark Phillips schrieb am Di., 7. Juni 2022, > 17:02: > >> I can't seem to be able to create a test d

Re: Having Trouble Creating a Test Database

2022-06-07 Thread atoosa Keshavarz
Hi Why do not you use mock for data base ? If you use mock data base you do not need test data base and your data base will not be change On Tue, 7 Jun 2022, 7:32 pm Mark Phillips, wrote: > I can't seem to be able to create a test database for my django project. I > get this

Re: Having Trouble Creating a Test Database

2022-06-07 Thread Sebastian Jung
Do you have make manage.py migrate and afzer this manage.py makemigrations? Mark Phillips schrieb am Di., 7. Juni 2022, 17:02: > I can't seem to be able to create a test database for my django project. I > get this error: > > django.db.utils.ProgrammingError: (

Having Trouble Creating a Test Database

2022-06-07 Thread Mark Phillips
I can't seem to be able to create a test database for my django project. I get this error: django.db.utils.ProgrammingError: (1146, "Table 'test_hopi_django.CurrentArticle' doesn't exist") I have full details at https://stackoverflow.com/questions/72521409/cant-create-django-tes

How to test urls

2022-03-23 Thread Prashanth Patelc
Hi all, how test the urls in django rest , i need each url response how to write one file for each url response need to write a URL in our application, which will return working or something as a response ? * not test cases -- You received this message because you are subscribed

Re: Got an error creating the test database: database "" already exists

2022-03-17 Thread Salima Begum
tian Jung < >>>>> sebastian.ju...@gmail.com> wrote: >>>>> >>>>>> Hey salima, >>>>>> >>>>>> This error is strange. Django try to use a Relation in postgresql >>>>>> which doesn't exist. >

Re: Got an error creating the test database: database "" already exists

2022-03-17 Thread DJANGO DEVELOPER
reset database. I would delete database >>>>> in postgresql and create it new with psql tool. After this you must reset >>>>> all migrations: >>>>> >>>>> >>>>> https://simpleisbetterthancomplex.com/tutorial/2016/07

Re: Got an error creating the test database: database "" already exists

2022-03-17 Thread Prashanth Patelc
utorial/2016/07/26/how-to-reset-migrations.html >>>> >>>> And after this when you migrate it, then structure is created in new >>>> database. >>>> >>>> I am sorry i have no idea how yoz can fix relation exception manual. >>>>

Re: Got an error creating the test database: database "" already exists

2022-03-16 Thread Avinash Alanjakar
this you must reset all >>> migrations: >>> >>> >>> https://simpleisbetterthancomplex.com/tutorial/2016/07/26/how-to-reset-migrations.html >>> >>> And after this when you migrate it, then structure is created in new >>> database. >>> >

Re: Got an error creating the test database: database "" already exists

2022-03-16 Thread Salima Begum
migrate it, then structure is created in new >> database. >> >> I am sorry i have no idea how yoz can fix relation exception manual. >> >> Regards >> >> >> Salima Begum schrieb am Mi., 16. März >> 2022, 06:51: >> >>> Hi all, &g

Re: Got an error creating the test database: database "" already exists

2022-03-16 Thread DJANGO DEVELOPER
te it, then structure is created in new > database. > > I am sorry i have no idea how yoz can fix relation exception manual. > > Regards > > > Salima Begum schrieb am Mi., 16. März > 2022, 06:51: > >> Hi all, >> After writing test cases I run test cases I am

Re: Got an error creating the test database: database "" already exists

2022-03-16 Thread Sebastian Jung
/tutorial/2016/07/26/how-to-reset-migrations.html And after this when you migrate it, then structure is created in new database. I am sorry i have no idea how yoz can fix relation exception manual. Regards Salima Begum schrieb am Mi., 16. März 2022, 06:51: > Hi all, > After writing test

Got an error creating the test database: database "" already exists

2022-03-15 Thread Salima Begum
Hi all, After writing test cases I run test cases I am getting an error below ``` Python manage.py behave ``` After running the above command I am getting this error. ``` Creating test database for alias 'default'... Got an error creating the test database: database "test_newDataBase&quo

Debug Django Test-cases

2022-02-25 Thread HEMENDRA SINGH HADA
Hi Team, I am writing some django test-cases, there are multiple test-cases are failing inside view or models, but I am not getting exact root cause for those failure, Could you please suggest me any tool which is used to debug the django unit test cases, Also if you can share my some good

Re: Running tests fails in the test runner call_command

2021-12-22 Thread Thomas
.10 installation and haven’t run my unit tests in a long > time. When I try now, I get a failure which seems to trace back to the test > runner itself: > > TypeError: Unknown option(s) for check command: databases. Valid options > are: all, debug, force_color, help, names, no_color,

Running tests fails in the test runner call_command

2021-12-21 Thread Thomas Lockhart
I’ve got a 3.2.10 installation and haven’t run my unit tests in a long time. When I try now, I get a failure which seems to trace back to the test runner itself: TypeError: Unknown option(s) for check command: databases. Valid options are: all, debug, force_color, help, names, no_color

Asynchronous test always failing

2021-11-18 Thread Julie Agopian
Hello, I hope I am on the right place. I want to write some test from my async view and I follow the documentation but it keeps failing. this is my view: ```class Session(View): """ Asynchronously get a session for a system.""" @classonlymethod def as_view(cl

Unable to add token headers to graphene-django test using pytest

2021-10-04 Thread Muhammad Shehzad
, client=client) return func @pytest.fixture def create_candidate(candidate_factory): candidate = [] for _ in range(5): can = candidate_factory.create() token, __ = Token.objects.get_or_create(user=can.user) candidate.append(can) return candidate **This is the test** @pytest.mark.django_db def

Re: Django Unit-test

2021-07-06 Thread Veera Raj
I am fresher In django wanna have a opportunity.can anyone help me ? On Tue, Jul 6, 2021, 9:29 PM Yonatan Girma wrote: > Greetings, > > We are looking for Django app unit tester for small business project. Any > person with professional experience please send resume to > support-...@adulis.com

Django Unit-test

2021-07-06 Thread Yonatan Girma
Greetings, We are looking for Django app unit tester for small business project. Any person with professional experience please send resume to support-...@adulis.com Respectfully, Yonatan G. -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Challenges Building and Integrating Test and Live API keys

2021-06-15 Thread Miracle
I want to create a system that works similar to stripe. There'll be live API keys, as well as test API keys. I have been thinking of how to implement this architecture, and I am not sure the best way to go about it. I found a similar question on this but it didn't help much. Architecturing

Re: Question about models. test

2021-05-02 Thread Peter of the Norse
; publication_url to just url since it's a part of the Publication model, > the "publication" part is redundant. > >> and observed there are some inactive URLs on the production server (due to >> data entry mistakes). Is there any way I can write a test for the inact

Got an error creating the test databse - with mysql and docker-compose

2021-05-01 Thread Gwanghyeon Gim
Hi django developers! I have an issue with creating test database. I use mysql for db and docker compose. I have no problem running docker containers with docker-compose, but when I run test it spits this error message. Note that the name of django service is web, and mysql service is db

Re: How to properly document and test models with natural keys

2021-04-11 Thread Anusheel Bhushan
). Happy to answer more specific qs... On Monday, March 29, 2021 at 2:59:12 AM UTC-7 Olivier wrote: > Hello, > > I'm thinking about adding natural keys to a lot of existing models (Djano > 3.1.7) to help initializing dev or prod database. > > 1. How best to unit test models using

How to test foreign key in clean() [was: Django Admin 3.1.7: getting RelatedObjectDoesNotExist for required ForeignKey]

2021-03-30 Thread Olivier
success. I was thinking of accessing some model dict if such exist. 2. How can I import RelatedObjectDoesNotExist errors in my code ? 3. Would you say that throwing an error when executing a simple "if self.server_host" test is a bug (that should be reported) or not ? Best regards Le lundi 29

How to properly document and test models with natural keys

2021-03-29 Thread Olivier
Hello, I'm thinking about adding natural keys to a lot of existing models (Djano 3.1.7) to help initializing dev or prod database. 1. How best to unit test models using natural keys ? I was thinking of separately testing both serialization and deserialization but would be very curious

Re: Question about models. test

2021-02-25 Thread Ryan Nowakowski
he "publication" part is redundant. > and observed there are some inactive URLs on the production server (due to > data entry mistakes). Is there any way I can write a test for the inactive > URLs from the database (local copy)?. I assume "inactive" here means that the UR

Question about models. test

2021-02-24 Thread dupakoor kannan
). Is there any way I can write a test for the inactive URLs from the database (local copy)?. Thanks Kannan -- 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

Re: test client vs jinja?

2021-02-10 Thread Roy Smith
): > template_rendered.send(sender=self, template=template, > context=context) > return render(request, template, context) > > mock_render.side_effect = render_patch > > At least doing it this way puts all the weird stuff in my test code. I

Re: test client vs jinja?

2021-02-10 Thread Roy Smith
) return render(request, template, context) mock_render.side_effect = render_patch At least doing it this way puts all the weird stuff in my test code. I didn't have to touch anything in my production view code (or in either django or jinja). On Thursday, February 4, 2021 at 7:29:23

Re: test client vs jinja?

2021-02-10 Thread Roy Smith
It's a known problem. See https://code.djangoproject.com/ticket/24622. In short, the django template code has hooks to populate these values in the test client's response. The jinja folks (understandably) don't want to add the same hooks. On Friday, February 5, 2021 at 1:37:10 AM UTC-5 Benny

Re: test client vs jinja?

2021-02-04 Thread Benny M
Hi Roy, I haven’t been through this personally, but it strikes me as odd that the test can’t read the request context. On the surface it would stand to reason that if the test can’t read it, then the page wouldn’t render on browser request. Can you post an example of one of your failing tests

test client vs jinja?

2021-02-04 Thread Roy Smith
I started my current project using native django templates and now I'm converting to jinja2. For the most part, it has gone smoothly. The surprising roadblock was that this broke all my unit tests. The issue is that django.template.backends.jinja2.Jinja2 doesn't populate response.context.

test

2020-11-11 Thread rssail
message not 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 view this discussion on the web visit

Django test runner not respecting unittest.TestCase?

2020-08-10 Thread Derek DeHart
For one of my functional tests, I decided to use unittest.TestCase instead of a Django test class because it was convenient when cleaning up the test to have direct access to my local development database in the test itself. Running the test in isolation like so passes as I'd expect: $ python

Re: social_django.models.UserSocialAuth.DoesNotExist in unit test

2020-08-05 Thread Roy Smith
Roy Smith wrote: > > I have both model and social backends configured in settings.py: > >> AUTHENTICATION_BACKENDS = ( >> 'django.contrib.auth.backends.ModelBackend', >> 'social_core.backends.mediawiki.MediaWiki', >> ) > > > When I run this

social_django.models.UserSocialAuth.DoesNotExist in unit test

2020-08-04 Thread Roy Smith
I have both model and social backends configured in settings.py: > AUTHENTICATION_BACKENDS = ( > 'django.contrib.auth.backends.ModelBackend', > 'social_core.backends.mediawiki.MediaWiki', > ) When I run this test: > from django.test import TestCase

How to test get_success_url method in class based view

2020-05-13 Thread Sumit Kumar
Hey, everyone. Please help me in this problem, i'm trying to test the get_success_url method, but didn't got success. https://stackoverflow.com/questions/61745172/how-to-test-get-success-url-in-classbasedview-for-django -- You received this message because you are subscribed to the Google

Re: TestCase failing when using transaction.atomic() inside test

2020-05-12 Thread Uri Kogan
ion.atomic*' block. On Tuesday, May 12, 2020 at 10:35:31 AM UTC+3, Uri Kogan wrote: > > The documentation states that "you cannot test that a block of code is > executing within a transaction" while I am looking to "test a block of code > that has a transaction".

Re: TestCase failing when using transaction.atomic() inside test

2020-05-12 Thread Uri Kogan
The documentation states that "you cannot test that a block of code is executing within a transaction" while I am looking to "test a block of code that has a transaction". In any case, the issue here is that "transaction.atomic" does not work when neste

Re: TestCase failing when using transaction.atomic() inside test

2020-05-12 Thread Aldian Fazrihady
database behaviors cannot be tested within a Django TestCase class. For instance, you cannot test that a block of code is executing within a transaction, as is required when using select_for_update() <https://docs.djangoproject.com/en/3.0/ref/models/querys

Re: TestCase failing when using transaction.atomic() inside test

2020-05-12 Thread Uri Kogan
ot; call of django-role-permissions uses "transaction.atomic". Which, of course, I would not want to change, as this is an external library. So I can't really remove usages of "transaction.atomic" On Tuesday, May 12, 2020 at 9:48:21 AM UTC+3, Aldian Fazrihady wrote:

Re: TestCase failing when using transaction.atomic() inside test

2020-05-12 Thread Aldian Fazrihady
When testing django apps, my unit test usually accesses the django app via django test client: https://docs.djangoproject.com/en/3.0/topics/testing/tools/#the-test-client. Django test client simulates http access, so my Django tests always run my Django code starting from Django views. Even though

Re: TestCase failing when using transaction.atomic() inside test

2020-05-11 Thread Uri Kogan
t; > Pada tanggal Sel, 12 Mei 2020 04.02, Uri Kogan > menulis: > >> Hello, >> >> I am using TestCase and trying to create an object during test. >> There is a log activated on MySQL server, so I see all the queries being >> executed there. >> >> T

Re: TestCase failing when using transaction.atomic() inside test

2020-05-11 Thread Aldian Fazrihady
an object during test. > There is a log activated on MySQL server, so I see all the queries being > executed there. > > This "transaction.atomic" sets a SAVEPOINT in the database thinking that > the transaction is already started. The problem is that there is no >

TestCase failing when using transaction.atomic() inside test

2020-05-11 Thread Uri Kogan
Hello, I am using TestCase and trying to create an object during test. There is a log activated on MySQL server, so I see all the queries being executed there. This "transaction.atomic" sets a SAVEPOINT in the database thinking that the transaction is already started. T

Custom Mysql Lookup for FULLTEXT Search Returns empy on test runs

2020-05-06 Thread Gui Talarico
ame} ({field_name})", f"DROP INDEX {index_name} ON {table_name}", ), ] ``` The __search works fine, but I use it inside a test suite it returns empty. Any help or feedback is appreciated Details are here https://stackoverflow.com/questions/61486725/django-mysql-fullte

Re: Creating test databases in parallel

2020-04-02 Thread Ram Rachum
When you say "shrinking your test databases", what do you mean exactly? I'm a bit of a newbie on that part of Django. On Wed, Apr 1, 2020 at 8:13 PM Thomas Lockhart wrote: > If you are trying to optimize the test flow, then you may want to spend > some time shrinking you

Re: Creating test databases in parallel

2020-04-01 Thread Thomas Lockhart
If you are trying to optimize the test flow, then you may want to spend some time shrinking your test databases to a more manageable size. Or have two sets; abbreviated and full, with the larger one to exercise your (unknown) edge cases. hth - Tom > On Apr 1, 2020, at 2:25 AM, cool-RR wr

Re: Creating test databases in parallel

2020-04-01 Thread Ram Rachum
gt; > On Wed, 1 Apr 2020, 11:25 am cool-RR, wrote: > >> Hi guys, >> >> I'm trying to optimize our Django testing workflow. >> >> We have 7 different databases, and Django spends a lot of time on these >> lines: >> >> >> Creating test d

Re: Creating test databases in parallel

2020-04-01 Thread Motaz Hejaze
n these > lines: > > > Creating test database for alias 'main_database'... > Creating test database for alias 'foo_database'... > Creating test database for alias 'bar_database'... > Creating test database for alias 'baz_database'... > > > This is especially annoying when you'r

Creating test databases in parallel

2020-04-01 Thread cool-RR
Hi guys, I'm trying to optimize our Django testing workflow. We have 7 different databases, and Django spends a lot of time on these lines: Creating test database for alias 'main_database'... Creating test database for alias 'foo_database'... Creating test database for alias 'bar_database

Issue with Fixutre loading with multiple test cases on Postgres - duplicate key value violates unique constraint

2020-02-24 Thread Lokesh
the issue with even this code class Test2(TestCase): fixtures = ['fixture.json'] def test_demo2(self): u = User.objects.get(username='testuser1') #Some testing I have these two test cases and my fixture has 2 rows in total, one for the User table with pk=1, and the other

Saving np.nan to sqlite database Django 2.1 in unit test fails

2020-02-13 Thread BK
value).quantize(quantize_value, context=expression.output_field.context) 2120TypeError: argument must be int of float The unit test involves adding numpy.nan (among other things) to the database (in a models.DecimalField field) and at some point later in the test we are querying that data and when it try's to evalua

Re: Test -Error :AssertionError: 404 != 200

2020-02-02 Thread Integr@te System
Hi man, How about pk you expect to test by declare in test.py with '/post/264, so != 200 in result!? On Sun, Feb 2, 2020, 22:05 Body Abdo wrote: > Dear all > > I can't do the test -error is > self.assertEqual(response.status_code, 200) > AssertionError: 404 != 200 > My

Test -Error :AssertionError: 404 != 200

2020-02-02 Thread Body Abdo
Dear all I can't do the test -error is self.assertEqual(response.status_code, 200) AssertionError: 404 != 200 My code is views.py class DetailPageView(DetailView): model = Series template_name='/var/www/project/tapelss/movies/archive/templates/archive/detail.html' urls.py app_name

Re: add icmp test

2020-01-26 Thread Gil Obradors
Of course, as pure python https://stackoverflow.com/a/10402323 Missatge de paulo milo escano del dia dg., 26 de gen. 2020 a les 16:41: > can django support ping test, such as using subprocess module > > -- > You received this message because you are subscribed to the Google Grou

add icmp test

2020-01-26 Thread paulo milo escano
can django support ping test, such as using subprocess module -- 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.co

Re: Error with running test suite while contributing to django

2020-01-25 Thread Muhammed abdul Quadir owais
(like $ python -m pip install -e > /path/to/your/local/clone/django/ > and $ python -m pip install -r requirements/py3.txt (no errors here) then ,.. > then after cd to tests then running this command > .

Re: Error with running test suite while contributing to django

2020-01-25 Thread aakansha jain
) then > ,.. > then after cd to tests then running this command ./runtests.py > ) &

Error with running test suite while contributing to django

2020-01-24 Thread Muhammed abdul Quadir owais
requirements/py3.txt (no errors here) then ,.. then after cd to tests then running this command ./runtests.py ) the test here is giving as response

When I use requests test loginView, return 302 and response header set-cookie , in sessionid line, there are always have a "SameSite=Lax," before sessionid string. This causes client cookies parser pr

2020-01-08 Thread bjxyys XIN
{set-cookie: csrftoken=dsEtx2CP6rX5bhIbRmkTOv5LmciytID5t6ShQbgNMTALTnhCoXdxWQ1TcAzxQoDO; expires=Wed, 06 Jan 2021 17:01:00 GMT; Max-Age=31449600; Path=/; SameSite=Lax,sessionid=2rtrkbnhc8m30iqs7sw4em014hr6a3ss; expires=Wed, 22 Jan 2020 17:01:00 GMT; HttpOnly; Max-Age=1209600; Path=/;

Re: Unable to create a new virtual environement 'test'

2019-12-11 Thread Hima Bindu chowdary
it worked! really appreciate the help! On Wednesday, December 4, 2019 at 10:24:30 PM UTC+5:30, Manjunatha C wrote: > > Python -m venv envname > > Try with this command -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this

Unable to create a new virtual environement 'test'

2019-12-04 Thread Manjunatha C
Python -m venv envname Try with this command -- 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 view this discussion

Re: Unable to create a new virtual environement 'test'

2019-12-04 Thread Suraj Thapa FC
Wrote the following Virtualenv test On Wed, 4 Dec 2019, 4:57 pm Hima Bindu chowdary, wrote: > I had created a virtualwrapper then had to create a virtual env called test > when i ran the following command i got this : > > C:\Users\User>py -m pip install virtualenv test > R

Unable to create a new virtual environement 'test'

2019-12-04 Thread Hima Bindu chowdary
I had created a virtualwrapper then had to create a virtual env called test when i ran the following command i got this : C:\Users\User>py -m pip install virtualenv test Requirement already satisfied: virtualenv in c:\users\user\appdata\local\programs\python\python38\lib\site-packages (16.

Unit test in django

2019-12-02 Thread Saswat Ray
json.dumps(payload), headers=headers) # print(response.content)return HttpResponse('success')* *i am writing unitest for the above function,there are some Factory and fakers method is used. I am looking how i can convert this * user_id = Campaign.objects.filter

Django Rest Framework test fails or passes, depending on number of functions in APITestCase class

2019-10-24 Thread Conor
Hei all, I have an issue with a test class (APITestCase) where a function can pass the test if it is the only function within the class, or fail, if it is one of two or more functions. I have put this question on Stack Overflow where it is available with nicer formatting. https

Re: facing issue on unit test

2019-09-08 Thread Arulselvam K
Thanks!, So for each test , do i need to add same test data? or do we have any other way not to repeat the same test data? On Tuesday, 13 August 2019 20:32:16 UTC+5:30, Vinicius Assef wrote: > > The database is cleared after each test method. > > So, in a new testcase your datab

Re: facing issue on unit test

2019-08-13 Thread Vinicius Assef
The database is cleared after each test method. So, in a new testcase your database is empty. On Tue, 13 Aug 2019 at 00:34, Arulselvam K wrote: > Have hosted the code @ "https://github.com/tbone230590/plib; > Here is the problem I have two models Book and IssuedBook, IssuedBook hav

facing issue on unit test

2019-08-12 Thread Arulselvam K
ailable @ "/api/unit_tests/models". I am able to test Book model successfully. But I have a test for IssuedBook model which is referring Book model is getting failed. It seems cause of the problem is referring Book object created in BookTestCase that was previously run. But I dont underst

Re: Test

2019-08-06 Thread Mike Dewhirst
On 7/08/2019 1:35 pm, Tosin Ayoola wrote: Halo guyz,  working on an e-commerce project & I rili wan write the test for this project,  hoping someone can lead me in direction to go https://docs.djangoproject.com/en/2.2/topics/testing/ -- You received this message because you are subscr

Test

2019-08-06 Thread Tosin Ayoola
Halo guyz, working on an e-commerce project & I rili wan write the test for this project, hoping someone can lead me in direction to go -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop re

Raise concurrent.futures._base.CancelledError when i test django channels websocket

2019-06-11 Thread nima
Hi. I'm using Django channels in server side for a speech to text application. When I test websocket with jmeter(+120 user or thread in 1 second), about half of requests fail. Here is my code: class Consumer(AsyncWebsocketConsumer): def __init__(self, *args, **kwargs

possible bug: test loader fails if models/__init__.py defined

2019-05-08 Thread Matthew Hegarty
plication registry may not be fully > populated at this point, which could cause the ORM to malfunction. However after doing this, running tests with ./manage.py test -k causes the unittest loader to fail with: ERROR: myapp.api.models (unittest.loader

Django test

2019-04-22 Thread Elber Tavares
Test django -- 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 dj

Re: Inconsistent Django test results depending upon how the test is called in Django 1.5.1 running on Python 2.7.4

2019-03-27 Thread Ruben Alves
I had a similar problem and I solved it by making all tests inherit from `django.test.TestCase`. I had some tests inheriting from `unittest.TestCase`, which doesn't reset the database after the test is finished. I found the answer on https://stackoverflow.com/a/436795/6490637 Em segunda

Test FrameWork Cleanup

2019-03-22 Thread Gourav Sardana
Hey, I am Gourav Sardana undergraduate computer science student.I am interested in the idea of test framework cleanup. @Mentors Can i ask you one thing? we have to build a software for improving code or we have to add this in our django core code? Regards, Gourav Sardana -- You received

Re: test if model object fits into QuerySet without executing SQL?

2019-03-18 Thread jgibson
ion is - if I get a model object from QuerySet #1, is it >>> possible to check if the model object is 'filtered' or fits into QuerySet >>> #2, without actually executing the SQL for QuerySet #2 to find the record >>> again? >>> >>> I'm asking becau

Re: test if model object fits into QuerySet without executing SQL?

2019-03-18 Thread Jani Tiainen
ecords from table where color = "blue" >>> >>> So QuerySet #2 is more restricted than QuerySet #1 >>> >>> So question is - if I get a model object from QuerySet #1, is it >>> possible to check if the model object is 'filtered' or fits into QuerySet &

Re: test if model object fits into QuerySet without executing SQL?

2019-03-18 Thread Thomas Klopf
on is - if I get a model object from QuerySet #1, is it possible >> to check if the model object is 'filtered' or fits into QuerySet #2, >> without actually executing the SQL for QuerySet #2 to find the record again? >> >> I'm asking because running the SQL for QuerySet #2 is exp

Re: test if model object fits into QuerySet without executing SQL?

2019-03-15 Thread Phako Perez
e" >> >> So QuerySet #2 is more restricted than QuerySet #1 >> >> So question is - if I get a model object from QuerySet #1, is it possible to >> check if the model object is 'filtered' or fits into QuerySet #2, without >> actually executing the SQL f

Re: test if model object fits into QuerySet without executing SQL?

2019-03-15 Thread jgibson
l object from QuerySet #1, is it possible > to check if the model object is 'filtered' or fits into QuerySet #2, > without actually executing the SQL for QuerySet #2 to find the record again? > > I'm asking because running the SQL for QuerySet #2 is expensive, ideally > would test if t

test if model object fits into QuerySet without executing SQL?

2019-03-15 Thread Thomas Klopf
bject from QuerySet #1, is it possible to check if the model object is 'filtered' or fits into QuerySet #2, without actually executing the SQL for QuerySet #2 to find the record again? I'm asking because running the SQL for QuerySet #2 is expensive, ideally would test if the record fits into th

test message

2019-02-25 Thread Mike Dewhirst
No need to answer this. I'm just seeing if googlegroups sends it me. Haven't much from the list since gmail got itself listed in SORBS the other day - and in particular I didn't get a message I posted in the browser. -- You received this message because you are subscribed to the Google Groups

  1   2   3   4   5   6   7   8   9   10   >