As configured in my dotfiles.
start new:
tmux
start new with session name:
#!/usr/bin/env python3 | |
""" | |
CI script to check: | |
1. Models have both a unique and not_null test. | |
2. Models have a description and columns (i.e. a schema.yml entry) | |
""" | |
import json | |
import logging | |
import os | |
import subprocess |
# See https://codeship.com/documentation/docker/browser-testing/ | |
FROM myapp:base | |
# We need wget to set up the PPA and xvfb to have a virtual screen and unzip to install the Chromedriver | |
RUN apt-get install -y wget xvfb unzip | |
# Set up the Chrome PPA | |
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - | |
RUN echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list |
{ | |
"app/initializers/*.js": { | |
"type": "initializer" | |
}, | |
"app/models/*.js": { | |
"type": "model", | |
"alternate": "app/adapters/{}.js", | |
}, | |
"app/adapters/*.js": { | |
"type": "adapter", |
require 'capybara/poltergeist' | |
Capybara.register_driver :poltergeist do |app| | |
Capybara::Poltergeist::Driver.new(app, :inspector => true, :js_errors => true, :phantomjs_options => ['--ssl-protocol=tlsv1']) | |
end |
/* Useful celery config. | |
app = Celery('tasks', | |
broker='redis://localhost:6379', | |
backend='redis://localhost:6379') | |
app.conf.update( | |
CELERY_TASK_RESULT_EXPIRES=3600, | |
CELERY_QUEUES=( | |
Queue('default', routing_key='tasks.#'), |
/* | |
Copyright (c) 2017 Chris Patuzzo | |
https://twitter.com/chrispatuzzo | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
As configured in my dotfiles.
start new:
tmux
start new with session name:
Demonstrate use of fixture
with Flask-SQLAlchemy and Flask-Testing.
February 13, 2011
Ron DuPlain <ron.duplain@gmail.com>
Post any feedback to: flask@librelist.org
Get this gist:
git clone git://gist.github.com/824472.git Flask-SQLAlchemy-Fixture cd Flask-SQLAlchemy-Fixture
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |