Skip to main content
0 votes
0 answers
57 views

I am working on a tutorial project. The same code works for the instructor but doesn't work for me. I have a file for custom commands: import time from psycopg2 import OperationalError as ...
The Bat's user avatar
  • 1,113
2 votes
1 answer
47 views

I'm writing a testcase to reproduce deadlock in my service. After I use multiprocessing to create a two thread, I found they use the same database connection. So I can't reproduce the deadlock ...
scanf3's user avatar
  • 43
0 votes
0 answers
73 views

The register page is not redirecting to the homeowner-dashboard page when I click on the register button. When clicking on it, literally nothing happens. I inspected the Console and all it shows is ...
Corveloper's user avatar
0 votes
1 answer
88 views

I am a university student, and I decided to use Django for my final year project. This means I am limited to using the University's MySQL database server. On the server, I am only allowed to have one ...
fiocotti's user avatar
2 votes
2 answers
504 views

I have a simple django project that I'm making in pycharm. The directory structure is the following: zelda_botw_cooking_simulator |-- cooking_simulator_project |---- manage.py |---- ...
BLimitless's user avatar
  • 2,765
1 vote
1 answer
66 views

I have one concern in writing the test code for list view. For DRF's list view, it responds to multiple data. What should I do if I assume that the response.data object is a model with many fields? ...
Antoliny Lee's user avatar
0 votes
0 answers
44 views

I'm trying to avoid code duplication so I want to import login from users/test to the ordering/test where I need to test different views that have @login_required. users/test.py User = get_user_model()...
M4rc0txt's user avatar
1 vote
1 answer
42 views

I am trying to pass request to a Django form in unittest. This is my test: def test_AddPairedStudyForm(self): self.client.force_login(self.user) request = RequestFactory().get(reverse("...
HenryM's user avatar
  • 5,801
0 votes
1 answer
63 views

I want a test database created for my default database in Django latest version, for that I configured in project settings.py file as below. DATABASES = { 'default': { 'ENGINE': 'django.db....
Kapil Yadav's user avatar
1 vote
1 answer
23 views

I'm trying to test BookList url but got this error " self.assertEqual(resolve(url).func, BookList.name) AssertionError: <function View.as_view..view at 0x0000025699398360> != 'BookList'&...
Lucian's user avatar
  • 13
0 votes
1 answer
142 views

I need to write test for a custom field with access to the database. The code is the following : class TestMyField (TestCase): def SetUpClass(cls): super().setUpClass() class MyModel(...
piscvau's user avatar
  • 23
0 votes
0 answers
23 views

In my project i have UserUpdateView like this: class UserUpdateView(AuthenticationMixin, AuthorizationMixin, SuccessMessageMixin, UpdateView): '''Update User info(username, full/second name, password)...
Andrei Emelianenko's user avatar
2 votes
2 answers
204 views

The following simple test, from django.test import TestCase class TestSetup(TestCase): def test_setUp(self): pdb.set_trace() # Code here deleted, it made no ...
Ron's user avatar
  • 255
0 votes
1 answer
33 views

My view class MovieUpdateView(UpdateView): model = Movie template_name = "movie_update.html" fields = [ 'movie_name', 'movie_year', 'movie_director', ...
iigorsap's user avatar
0 votes
0 answers
37 views

I'm encountering an AssertionError in my Django unit test when attempting to save a POST request to an existing list. Despite creating the list and sending the POST request successfully, the test ...
Zimzozaur's user avatar

15 30 50 per page
1
2 3 4 5
31