Yes. I will search some tests that will be use mock! Thank you for the
answer!

Alessia

Il lun 19 mar 2018, 15:11 Federico Capoano <[email protected]> ha
scritto:

> in 2014 we tried to run tests by connecting to real devices, that makes it
> impossible to run the test suite on travis-ci and also makes it very hard
> for new contributors to run the tests because they have to have all the
> hardware needed to run the tests, which is very unpractical.
>
> For mocking, we mean this:
> https://realpython.com/blog/python/testing-third-party-apis-with-mocks/
> It means using the standard mock library of python to temporarily replace
> methods that perform external calls with simulations that behave in the
> same way but are just simulated.
> So if you perform an HTTP request and you expect a JSON response like
> {"detail": "success"}, you mock the method which performs the request so it
> returns that value without even performing the request.
>
> Is it clear now?
>
> Federico
>
> On Sun, Mar 18, 2018 at 11:15 AM Alessia Ventani <[email protected]>
> wrote:
>
>> Good afternoon,
>>
>> I'm writing the draft for the netengine project. What does it mean: "mock
>> all external network calls during tests (SSH, HTTP, SNMP)"?
>> Will I report some examples of tests where it's useful use mock or simply
>> the library that I will use?
>>
>> thank you,
>> Alessia Ventani
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "OpenWISP" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "OpenWISP" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/openwisp/4C8a9Yck6CM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to