Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
🇫🇷

freezed freezed

💭
🇫🇷
View GitHub Profile
@freezed
freezed / settings.py
Created Apr 23, 2019
Django templates settings for using nine
View settings.py
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [path.join(PROJ_DIR, "templates")],
"APP_DIRS": True,
"OPTIONS": {
"context_processors": [
"django.template.context_processors.debug",
"django.template.context_processors.request",
"django.contrib.auth.context_processors.auth",
View gist:7633b46fe0e8c9e2be121ec71f9caff5
Running with gitlab-runner 11.5.0-rc1 (e900028d)
 on docker-auto-scale ed2dce3a
Using Docker executor with image ruby:2.5 ...
Pulling docker image ruby:2.5 ...
Using docker image sha256:1dfe66cd651f90e47894b8da94cb23bac7811a5d333da451e36588c6f307b6ac for ruby:2.5 ...
section_start:1542272307:prepare_script
Running on runner-ed2dce3a-project-9404659-concurrent-0 via runner-ed2dce3a-srm-1542272248-35415d88...
section_end:1542272309:prepare_script
section_start:1542272309:get_sources
Cloning repository...
@freezed
freezed / TestSearch
Created Nov 6, 2018
DRY a redundant django-pytest class
View TestSearch
class TestSearch:
"""
Non-regresion tests #27 : non error if a search do not return products
"""
CLIENT = Client()
WITNESS = {
'templates': [
'ersatz/result.html',
'base.html',
View gist:58bd7e81d514e41dd8acf32bde7697ee
freezed@machine ~/git/pytest % python -V
Python 2.7.9
freezed@machine ~/git/pytest % source .venv/bin/activate
(.venv) freezed@machine ~/git/pytest % which python
/home/fred/git/ocp5/.venv/bin/python
(.venv) freezed@machine ~/git/pytest % python -V
Python 3.6.4
(.venv) freezed@machine ~/git/pytest % deactivate