TIL a quick way to mock files on tests:
from django.core.files import File
mock_file = Mock(spec=File)
mock_file.read.return_value = "content"
#Django#Python
France: where you can beat your wife to the hospital and walk free on the streets, but you'll get 18 months in prison if you gently slap the president... égalité quoi
"Why don't you do something productive" she said. So I built a useless #ReactJS mouse tracker https://t.co/pK6VwxvXR9 Yes It has some glitches, but who cares?
Funny when you deliberately break your unit test because you could not believe it passed on the first run, and you want to see if it's actually working. TDD requires a lot of self-confidence XD #Python#tdd
While learning React w/Redux: "You should avoid using clases because they are confusing. You should use functions and hooks instead"... 😕 like WordPress?
@ClientsRATP merci pour le prelevement de mon abonement navigo... ca fais bien de payer le 100% d'un service "minimum"... Si seulement vous n'aviez pas le monopole du service de transport
@hervelc Je suis d'accord. Merci bcp d'avoir lu et de vous avoir informé avant de juste répéter ce que les titres des médias de gauche publient (comme tant des gens font en ce moment)
A QA engineer walks into a bar. Orders a beer. Orders 0 beers. Orders 99999999999 beers. Orders a lizard. Orders -1 beers. Orders a ueicbksjdhd.
First real customer walks in and asks where the bathroom is. The bar bursts into flames, killing everyone.