alled Allah. And I cannot get it right :/
>>
>> On Monday 23 September 2024 at 13:44:21 UTC+1 RANGA BHARATH JINKA wrote:
>>
>>> In Django, when using `TestCase` for testing views, CSRF tokens are
>>> indeed not necessary since the test client does not enforce CSRF
&
e:
>
>> In Django, when using `TestCase` for testing views, CSRF tokens are
>> indeed not necessary since the test client does not enforce CSRF
>> protection. However, if you're testing forms directly (like a `ModelForm`),
>> you generally don’t need to provide a CSRF
In Django, when using `TestCase` for testing views, CSRF tokens are indeed
not necessary since the test client does not enforce CSRF protection.
However, if you're testing forms directly (like a `ModelForm`), you
generally don’t need to provide a CSRF token either, as the form itself
doe
>>> def test_form_valid(self):
>>> form_invalid = StyleForm(data={"name": "Computer", "price": 400.1234})
>>> self.assertFalse(form_invalid.is_valid())
>>> form_valid = StyleForm(data=self.data)
>>> self.assertTrue(form_valid
client.session['linked'],"false")
>> self.assertContains(response,"Compassionate")
>>
>> def test_login_form_is_valid(self):
>> login_valid = LoginForm(data=self.login_data)
>> self.assertTrue(login_valid.is_valid())
>> def test_login_aft
n_valid = LoginForm(data=self.login_data)
> self.assertTrue(login_valid.is_valid())
> def test_login_after_test(self):
> self.client.logout()
> response = self.client.post('/profile_test/',self.data, follow=True)
> self.assertEqual(self.client.session['linked'],"f
e_test/',self.data, follow=True)
self.assertEqual(self.client.session['linked'],"false")
response = self.client.post(reverse('account_login'),data=self.login_data)
#self.assertRedirects(response=response,expected_url='/')
#self.client.login(username='
Hi all,
Thanks for reading. I am at a stage where I am needing to do my testing,
and its is hard!
I managed to add a function after sign up and log in, using the signals of
allauth. As I am trying to add my tests as I work, I have added a little
change to the Session, to mark if my functions
-testing-database-between-test-runs
Long answer, do you really need to run tests on heroku?:
Running your tests on the same environment you have the production application
is not a common approach, I don’t think you have enough reasons to do this.
Usually you run your test in a different
issue.
I saw in a Ruby section the possibility of having a Dyno dB only for
testing but couldn't find it. Another option seems to connect to the
current database with some risks. A third option is to have a custom test
database on its own.
I don't know how to do this in Django form, p
g heavy database traffic.
>
> We're inviting members of the Django community to participate in testing
> this PR.
>
>
> Your feedback and testing are invaluable in ensuring the reliability,
> efficiency, and compatibility of this feature across various Django
> projects
ction pooling to
Django's Oracle backend. This enhancement promises to bring notable
improvements in performance and scalability, particularly for applications
handling heavy database traffic.
We're inviting members of the Django community to participate in testing
this PR.
Your feedb
I have an interesting testing problem which requires someone smarter
than me.
I want to prove correctness of multiple outcomes from multiple
regulatory computations based on, among other things, international
lists of assessed chemicals and their hazards.
Hazards include both human health
which are (somewhat) regularly updated when
those authorities notify changes.
Once an expert confirms a risk profile for a particular chemical we use
a Django management command to generate a new Django test in our test
harness. The objective is to run that/those tests in our regular testing
is critical to unit testing.
>
> Fixtures are unworkable and I need to respond to the actual reference
> data.
>
> How can i do real lookups (read-only) during tests?
>
> Thanks
>
> Mike
>
>
>
>
> --
> (Unsigned mail from my phone)
>
>
> --
&
On Mon, Oct 2, 2023 at 11:30 PM Mike Dewhirst wrote:
>
> This is probably in the docs so please drop me a link if you can.
>
> My project has fifteen or more tables of reference data which determine
> how the software behaves and therefore is critical to unit testing.
>
> Fi
Hi Mike,
I will suggest you use a database framework like SQLAlchemy to access your
tables' data with read-only queries.
Then you use the data queried to set your test cases using a testing
library like Pytest.
Do let know if you have other concerns with this approach.
Best Regards,
B
re tables of reference data which determine
> how the software behaves and therefore is critical to unit testing.
>
> Fixtures are unworkable and I need to respond to the actual reference
> data.
>
> How can i do real lookups (read-only) during tests?
>
> Thanks
>
> Mike
&
This is probably in the docs so please drop me a link if you can.My project has
fifteen or more tables of reference data which determine how the software
behaves and therefore is critical to unit testing.Fixtures are unworkable and I
need to respond to the actual reference data.How can i do rea
Hmm, when I remove the raise CommandError statement and replace it with
self.stdout.write, everything works well.
This helps me to point further studies. Thx!
On Wednesday, May 10, 2023 at 2:33:18 PM UTC+2 Bob Aalsma wrote:
> Ah, yes, thanks.
>
> I hesitate to comment on "If I understood the err
Ah, yes, thanks.
I hesitate to comment on "If I understood the error right." ;)
Umm, my problem here is that I think I'm using the exact same *code*
"manually" without errors.
I think I'm also using the same *values* for the manual and test runs.
So I don't understand the reason for the differe
If I understood the error right.
On Wed, May 10, 2023 at 5:47 PM Vishesh Mangla
wrote:
> Probably this would help:
> https://stackoverflow.com/questions/8609192/what-is-the-difference-between-null-true-and-blank-true-in-django
>
> On Wed, May 10, 2023 at 5:45 PM 'Bob Aalsma' via Django users <
>
Probably this would help:
https://stackoverflow.com/questions/8609192/what-is-the-difference-between-null-true-and-blank-true-in-django
On Wed, May 10, 2023 at 5:45 PM 'Bob Aalsma' via Django users <
django-users@googlegroups.com> wrote:
> Sorry Vishesh, thanks for the quick answer but I have no
Sorry Vishesh, thanks for the quick answer but I have no idea what you mean.
On Wednesday, May 10, 2023 at 2:00:51 PM UTC+2 Vishesh Mangla wrote:
> False or True check for yourself.
>
> On Wed, 10 May, 2023, 17:29 Vishesh Mangla, wrote:
>
>> It looks like you are passing a null but null=False is
False or True check for yourself.
On Wed, 10 May, 2023, 17:29 Vishesh Mangla,
wrote:
> It looks like you are passing a null but null=False is not set
>
> On Wed, 10 May, 2023, 17:27 'Bob Aalsma' via Django users, <
> django-users@googlegroups.com> wrote:
>
>> I'm trying to test a django-admin co
It looks like you are passing a null but null=False is not set
On Wed, 10 May, 2023, 17:27 'Bob Aalsma' via Django users, <
django-users@googlegroups.com> wrote:
> I'm trying to test a django-admin command and don't understand why the
> tests give errors on the code while the code works as expect
I'm trying to test a django-admin command and don't understand why the
tests give errors on the code while the code works as expected.
I'm under the impression that the *raise CommandError* is ignored by the
test, but don't understand why this would be.
Please help.
Running the code shows:
(.
nslationTests*
>>>
>>> what exactly is the purpose of *path.to.settings,* I'm getting an error
>>> while running the above line.
>>> Can anyone please explain?
>>>
>>> *Error*
>>> Testing against Django installed in '/home/ayus
.TranslationTests*
>>
>> what exactly is the purpose of *path.to.settings,* I'm getting an error
>> while running the above line.
>> Can anyone please explain?
>>
>> *Error*
>> Testing against Django installed in '/home/ayush/OS/django/django'
settings i18n.tests.TranslationTests*
>
> what exactly is the purpose of *path.to.settings,* I'm getting an error
> while running the above line.
> Can anyone please explain?
>
> *Error*
> Testing against Django installed in '/home/ayush/OS/django/django' with up
> to
* ./runtests.py --settings=path.to.settings i18n.tests.TranslationTests*
what exactly is the purpose of *path.to.settings,* I'm getting an error
while running the above line.
Can anyone please explain?
*Error*
Testing against Django installed in '/home/ayush/OS/django/django'
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
with fixtur
On 24/02/2022 16.18, Pradumn Maurya wrote:
Dear Sir/Mam I just face this problem when i am using makemigrations
cmd, how can i fix this. Can any one help me solve this problem?
I'm fairly certain no one will be able to help you solve this problem if
you don't describe it a bit more in detail
NotImplementedError: Database objects do not implement truth value testing
or bool(). Please compare with None instead: database is not None
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop
On 7/07/2021 9:56 am, Mike Dewhirst wrote:
It seems I have to meddle with history and persuade the testing
harness that my custom user model has been in the company app from the
beginning of time. See story below.
Upside is that testing will (might) start working again. Downside is
I'
It seems I have to meddle with history and persuade the testing harness
that my custom user model has been in the company app from the beginning
of time. See story below.
Upside is that testing will (might) start working again. Downside is
I'll go mad.
Any ideas?
Thanks
Mike
On 6/07
Hi all,
I am working on a website where we now want to do A/B testing. Now I have
previously looked into this - but have never found any good packages for
doing that. The landscape may have changed now then, so I was wondering if
anyone has any good suggestions for A/B testing packages? Or if
Thank you for the reply! I will totally try this tonight!
On Thursday, April 22, 2021 at 7:31:40 PM UTC-4 David Nugent wrote:
> Try creating a request using RequestFactory and use that to input the
> credentials. I don't think the way you are creating the form is valid.
>
> rf = RequestFactory(
Try creating a request using RequestFactory and use that to input the
credentials. I don't think the way you are creating the form is valid.
rf = RequestFactory()
request = rf.post('/some_mock_url', dict(username='abc',
password='password'))
form = AuthenticationForm(request)
--
You received thi
Hello all,
I am not sure what I am doing incorrectly with the below test case
information. I am simply trying to test the default authentication form of
django 3.1. This test should be a good/True login test.
Here is the Test case:-
class TestForms(TestCase):
def test_
.NoReverseMatch: Reverse for
'locales_site_changelist' not found. 'locales_site_changelist' is not a
valid view function or pattern name.
Is there some simple reason why reverse lookup does not work when testing?
(I actually need to use it in a client post request.)
Thanks
Dere
I work on an app that has Django Channels 1 deployed in production with
CPU-based auto-scaling. Most of the time, it works fine, but sometimes,
when the site is busy and many users are utilizing the parts of our
application that are channels-intensive, users are unable to utilize their
websocke
:59 PM
To: Django users
Subject: Hello ! I'm having some issues in django unit testing. Is there
anybody to help ?
Hello ! I'm having some issues in django unit testing. Is there anybody to help
?
I'm having confusion in testing django mixins . Can anyone share his/her git
with
Hello ! I'm having some issues in django unit testing. Is there anybody to
help ?
I'm having confusion in testing django mixins . Can anyone share his/her
git with such unit testing or have some experienced shareable codes.
how do I test this ?
def dispatch(self,request,*arg
I don’t know a test tutorial, but I think you can get some help in the Django docs. https://docs.djangoproject.com/en/3.1/topics/testing/tools/ -Samuel Nogueira Bacelar GitHub: https://github.com
Can anyone point me towards a tutorial for how to test a CreateView
function?
--
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...@googlegr
Hi do you hire contract based python/django freelancer?
We can help you in this and related tasks at fair prices. Reply or send
email to divy...@pythonmate.com
Best Regards,
Divyesh Khamele,
Pythonmate
On Thu, 1 Oct 2020, 6:32 pm albert, wrote:
> Hi
> due to the impact of corona/covid19 I am wo
Hi
due to the impact of corona/covid19 I am working in a django-web-project.
(I am a beginner to those Technologies...)
At the moment I am writing tests for a django application. Basic tests for
creating get- and post-request with the test server (client) are working.
But now I am facing a file
Hello everyone,
I run into a odd situation while trying to run some tests in an old project
(dj 1.8)
Then I tried the same on a django 3.1 and the problem is still there.
# models.py #
class Disco(models.Model):
nome = models.CharField('disco', max_length=50)
class Musica
I continue to receive the following exception error at every single one of
my tests. I'm running Python 3.8.2 on Windows 10.
Exception happened during processing of request from ('127.0.0.1', 54962)
Traceback (most recent call last):
File "c:\program fil
I am making a project for an online payment e-commerce
I think I got everything right as am following a Tutorial
Keep getting this Error: Not Authenticated Error I used the testing CC
Numbers for testing purposes
My question is the following codes correct and I'm getting Not
Authenti
The main reason behind learning about Testing is to check if the views that
we have written for, are generating the expected results or not. Suppose
you are writing an APIView to get a list of something, then you should
write a testcase to check whether that APIView is giving you the result
rar Ahmad
> wrote:
>
>> Hello Sir
>> I have trouble in learnig Testing tutorial of Djanog Documentation.
>> Can any one tell me what is the main concept of learnign test and how can
>> we learn it in easiest way.
>> I am waiting for reply
>>
>> --
>&
I’m having the same difficulty...
On Tue, 31 Mar 2020 at 3:32 PM, Abrar Ahmad
wrote:
> Hello Sir
> I have trouble in learnig Testing tutorial of Djanog Documentation.
> Can any one tell me what is the main concept of learnign test and how can
> we learn it in easiest way.
> I
Hello Sir
I have trouble in learnig Testing tutorial of Djanog Documentation.
Can any one tell me what is the main concept of learnign test and how can
we learn it in easiest way.
I am waiting for reply
--
You received this message because you are subscribed to the Google Groups
"Django
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 currentl
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
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 e
st)
>>>>> self.assertEqual(response.status_code, 201)
>>>>>
>>>>
>>>> In my view, I am accessing the data through *request.data* and passing
>>>> it to a serializer.
>>>>
>>>> In my current setting, I am gett
ion(self.request)
>>>> self.assertEqual(response.status_code, 201)
>>>>
>>>
>>> In my view, I am accessing the data through *request.data* and passing
>>> it to a serializer.
>>>
>>> In my current setting, I am getting a 400 error messa
gt;
>>>> response = views.blog_collection(self.request)
>>>> self.assertEqual(response.status_code, 201)
>>>>
>>>
>>> In my view, I am accessing the data through *request.data* and passing
>>> it to a serializer.
>&g
error message when I have
>> checked that the user does not exist.
>>
>> Any suggestions regarding the same?
>>
>> Thanks,
>> onlinejudge95
>>
>
> In case if someone needs it in the future, go and look at
> *django.test.RequestFactory *
>
>
ssage when I have
> checked that the user does not exist.
>
> Any suggestions regarding the same?
>
> Thanks,
> onlinejudge95
>
In case if someone needs it in the future, go and look at
*django.test.RequestFactory *
https://docs.djangoproject.com/en/3.0/topics/testing/advanced
Hi Guys,
Any leads would be appreciated
On Wed, Feb 12, 2020 at 6:22 PM onlinejudge95
wrote:
> Hi Devs,
>
> I was implementing unit-tests in my Django project and stumbled upon the
> following issue.
>
> I want to unit-test my POST route. I do not want to use the test client
> already shipped
Hi Devs,
I was implementing unit-tests in my Django project and stumbled upon the
following issue.
I want to unit-test my POST route. I do not want to use the test client
already shipped with Django (using it in my e2e tests). I want to know how
do I prepare my request object to pass to my view.
I have actually provided quite much verbose information in Stackoverflow
<https://stackoverflow.com/questions/59251954/django-does-not-override-settings-in-template-tag-testing>.
I have a problem overriding settings as testing template tags. I leave this
here in case you are inte
We had a bug in our production system. The timeout was set incorrectly.
Now I want to write a test which checks, that the value of the timeout is
correct.
I look at the docs and don't see a way to **read** the timeout value of a
particular cache-key:
https://docs.djangoproject.com/en/2.2/topi
form.is_valid() then form.save(commit=False)", and then proceeds to
save the contents of the formsets after testing them with formset
"is_valid" logic, before returning an HttpResponse. AFAICS, no exceptions
are raised to signal the error.
Let's say I now want to do some addition
As I said it's for testing purposes. You can have a mailbox t...@google.com,
emails to tes...@google.com are also routed to the t...@google.com mailbox.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this
w.instagram.com/epiccharterschools/>
<https://www.youtube.com/user/EpicCharterSchools>
On Sun, Jul 14, 2019 at 6:31 AM Benjamin Boy
wrote:
> Im currently developping a small app. For testing purposes i want to send
> emails to google with a plus sign in the email adress.
> The
Im currently developping a small app. For testing purposes i want to send
emails to google with a plus sign in the email adress.
The smtp backend sends the mail but i never leaves the server.
What i tried:
"
from django.core.mail import EmailMessage
email = EmailMessage('Subject',
On Friday, July 12, 2019 at 5:33:38 AM UTC-7, Chandrashekhar Singh wrote:
>
> Hello Developers,
> I am curious to know what are testing methods do we use in django. Does
> any has good examples or codes except django documentation.?
> thanks
>
I don't have numbers, but
Hello Developers,
I am curious to know what are testing methods do we use in django. Does
any has good examples or codes except django documentation.?
thanks
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this
Hi RyuCoder
Should not get_object_or_404 shortcut retry 404 status code?
El lunes, 10 de junio de 2019, 15:29:24 (UTC-5), RyuCoder escribió:
>
> Whats your question?
> I failed to understand that 😅
>
> On Tue, Jun 11, 2019, 1:45 AM Cristhiam Gabriel Fernández <
> cristh...@gmail.com > wrote:
>
>>
Whats your question?
I failed to understand that 😅
On Tue, Jun 11, 2019, 1:45 AM Cristhiam Gabriel Fernández <
cristhiang...@gmail.com> wrote:
> Hi Django super heroes
>
> I'm making of test cases for my simple Django application. When I test a
> view with get_object_or_404 shortcut it returns 20
Hi Django super heroes
I'm making of test cases for my simple Django application. When I test a
view with get_object_or_404 shortcut it returns 200 status code.
def my_view(self, request):
obj_id = request.POST.get('id')
obj = get_object_or_404(MyModel, pk=id)
# Test case
...data =
im getting an error when running the python predict.py scripts.
it returns "google.api_core.exceptions.ServiceUnavailable: 503 Deadline
Exceeded"
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving
Hi,
DRF does have built-in API viewer. To enable that you need to add
rest_framework app in your INSTALLED_APPS so it can find necessary
templates for showing.
On Tue, Apr 23, 2019 at 7:15 AM Shubham Joshi wrote:
> I have created the custom model authentication in django rest , so far I
> dont
I have created the custom model authentication in django rest , so far I
dont have front end , so my question is , Im I done with the API, since on
browser it gives an error TemplateDoesNotExist at /
rest_framework/api.html that of course due to I dont have template, in
postmen its giving {
"det
to the
>>> second HTML generation
>>> 3. Wiping out the csrf token parts from both HTML before comparing them.
>>>
>>> On Thu, 28 Mar 2019, 23:54 Simon Charette, wrote:
>>>
>>>> This is effectively failing because of a mechanism added in 1.10 t
out the csrf token parts from both HTML before comparing them.
>>
>> On Thu, 28 Mar 2019, 23:54 Simon Charette, wrote:
>>
>>> This is effectively failing because of a mechanism added in 1.10 to
>>> protect
>>> against BREACH attacks[0] by salting the CSRF to
;> against BREACH attacks[0] by salting the CSRF token.
>>
>> I'm not aware of any way to disable this mechanism but testing against the
>> exact HTML returned from a view seems fragile.
>>
>> I suggest you use assertContains[1] (with or without html=True) and
t HTML generation to the
>>> second HTML generation
>>> 3. Wiping out the csrf token parts from both HTML before comparing them.
>>>
>>> On Thu, 28 Mar 2019, 23:54 Simon Charette, wrote:
>>>
>>>> This is effectively failing because of
2019, 23:54 Simon Charette, wrote:
>>
>>> This is effectively failing because of a mechanism added in 1.10 to
>>> protect
>>> against BREACH attacks[0] by salting the CSRF token.
>>>
>>> I'm not aware of any way to disable this mechanis
omparing them.
>
> On Thu, 28 Mar 2019, 23:54 Simon Charette, wrote:
>
>> This is effectively failing because of a mechanism added in 1.10 to
>> protect
>> against BREACH attacks[0] by salting the CSRF token.
>>
>> I'm not aware of any way to disabl
is effectively failing because of a mechanism added in 1.10 to protect
> against BREACH attacks[0] by salting the CSRF token.
>
> I'm not aware of any way to disable this mechanism but testing against the
> exact HTML returned from a view seems fragile.
>
> I suggest you use
This is effectively failing because of a mechanism added in 1.10 to protect
against BREACH attacks[0] by salting the CSRF token.
I'm not aware of any way to disable this mechanism but testing against the
exact HTML returned from a view seems fragile.
I suggest you use assertContains[1] (wi
I am trying to unit test my index view. One unit-test that I have written
is testing whether the index view returns correct HTML or not by comparing
the input received through
django.template.loader.render_to_string
the unit-test fail with the following traceback
python manage.py test
Creating test da
I will then try like this in my manage.py:
if len(sys.argv)>1 and sys.argv[1] = 'test':
warnings.filterwarnings(...)
Thanks,
-Dan
On Thu, Jan 17, 2019 at 1:08 PM Simon Charette wrote:
> You can use the category kwarg of filterwarnings[0] to pass the Django
> deprecation
> warni
You can use the category kwarg of filterwarnings[0] to pass the Django
deprecation
warning classes.
They can be found in the django.utils.deprecation module. (e.g.
RemovedInDjango30Warning).
Cheers,
Simon
[0]
https://docs.python.org/3/library/warnings.html?highlight=filterwarnings#warnings.fi
PYTHONWARNINGS=error is too much.
How can I call warnings.filterwarnings() to make all *Django*
DeprecationWarnings into errors?
--
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,
tru...@konk.org> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA512
>
> On Wed, Jan 16, 2019 at 09:11:47AM +0200, אורי wrote:
> > Hi,
> >
> > I recently have problems with testing my project on Travis CI. Tests
> > started to fail 2 da
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
On Wed, Jan 16, 2019 at 09:11:47AM +0200, אורי wrote:
> Hi,
>
> I recently have problems with testing my project on Travis CI. Tests
> started to fail 2 days ago. The error message is
> `psycopg2.OperationalError: FATAL: database &q
Hi,
I recently have problems with testing my project on Travis CI. Tests
started to fail 2 days ago. The error message is
`psycopg2.OperationalError: FATAL: database "speedy" does not exist` and I
don't know why. It seems to me that the first test which fail for this
reason is
The issue was my using incorrect def get_absolute_url's in my model My
error.
On Wednesday, 24 October 2018 12:24:07 UTC+1, David wrote:
>
> Hi
>
> When I run tests on my app they run through fine.
>
> When I run tests just using "manage.py test" the app mentioned above
> contains failures.
Hi
When I run tests on my app they run through fine.
When I run tests just using "manage.py test" the app mentioned above
contains failures.
Example code:
def test_lumpsum_get_absolute_url(self):
lumpsum = LumpSum.objects.get()
self.assertEquals(lumpsum.get_absolute_url(),
I solved the problem by wrapping the imports of the test-file inside a
context manager, as follow:
with patch('django.core.mail.send_mail') as mocked_send_mail:
from ModuleToTest.File import functionToTest
That forced the patch to occur before the tested function was actualy
imported.
--
Am Montag, 13. August 2018 18:12:03 UTC+2 schrieb Mikhailo Keda:
>
> 1. take a dump of production db
> 2. remove/anonymize all sensitive or unneeded data (you can use django
> admin or sql or python script)
> 3. reduce amount of data if needed
> 4. take a git branch with fixes
> 5. make sure th
1. take a dump of production db
2. remove/anonymize all sensitive or unneeded data (you can use django
admin or sql or python script)
3. reduce amount of data if needed
4. take a git branch with fixes
5. make sure there are no sensitive data in your code
--
You received this message because you
*The users who should do the testing say "The new system should be like the
production system."*
You need to let them know ASAP that that is very unlikely to be the case,
unless you are using exactly the same tools. You can probably provide
similar functionality.
Otherwise you are
1 - 100 of 1090 matches
Mail list logo