home
join about login
gst

Nov. 12, 2017, 2:38 a.m.

How to disable cache during django tests

usually we don't want cache working while on tests
I do like this, in settings.py :

 CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'LOCATION': 'unique-snowflake',
},
}

TEST_CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
}
}

then in the tests, being in before a class or function, do this :
 @override_settings(CACHES=settings.TEST_CACHES)
def function(........):
do something

3359 views origin
Eclipse solar hoje! - Cetus Galaxies and Supernova - Trump quip about North Korea's Kim sparks outcry on social media - Tonella - revisão do limpador de parabrisa do fusca - Dieguito - A Lesma © ℗ MÚSICA AUTORAL Ensaio - Orion in Red and Blue - Slava Ukraini! on Steam - At Tranquility Base - Federer pummels Bemelmans to move closer to top spot - Los candidatos se disputan el poderoso voto del magisterio mexica - NASA Awards Contract for Continued Operations of its Jet Propulsi - amizades - Major League Baseball notebook: Mariners deal for Colome, Span fr - Little Planet Soyuz - Exclusive: North Korea earned $200 million from banned exports, s - Celebrating 28 Years of the Hubble Space Telescope - Wozniacki passes Barty test in Madrid, Sharapova advances - Noel Guarany | Sem Fronteira (1975) [Álbum Completo/Full Album] - Guri de Uruguaiana fala sobre hits do Carnaval e exageros no Phot - GLORIA GROOVE - SEDANAPO - Austria plans tougher sentences for crimes against women - casados - Eu vi eu viiiii O papai noel tava na sinaleira - The Extraordinary Spiral in LL Pegasi - NASA Awards Contract for Aerospace Systems Modeling, Simulation - This is how to train a cat :D How I Trained My Cat - Launching to Observe Our Sun - gliptodonte encontrado en Picada Varela - Climate change: 'Hothouse Earth' risks even if CO2 emissions slas - Fallece un exdiputado federal del PRI tiroteado este fin de seman - Pipi das Meias Altas Portuguese vol 1 - Southern California as Seen From Apollo 7 -  

tutti - social network

Tutti is the simplest social network on internet. Here you can make friends, create communities, sell things, make surveys, comment and share stuff.

PUDIM DE DOCE DE LEITE😋💓

➡️Ingredientes:
🔸️400 g de doce de leite (pote)
🔸️3 ovos
🔸️1 copo americano de leite
🔸️1 colher de farinha de trigo
.
➡️Modo de Preparo:
Bater todos os ingredientes no liquidificador, caramelizar uma assadeira de pudim e jogar a mistura.
Levar ao forno em banho maria por 35 minutos. Depois de frio, desenformar e levar à geladeira.
Para mais receitas acesse nosso site 👇
https://www.topreceitas.blog.br
image
more