This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var path = require('path'); | |
module.exports = function (config) { | |
config.set({ | |
basePath: '../webpack/test', | |
reporters: ['mocha'], | |
port: 9876, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table file_upload ( | |
id serial not null, | |
name text | |
); | |
create table reg_domain ( | |
id serial not null, | |
name text | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Traceback (most recent call last): | |
File "/Users/jim/uniregistrar/uniregistrar/uniregistrar/lib/tasks/job_task.py", line 79, in execute_job_task | |
response = task_method(job_task) | |
File "/Users/jim/uniregistrar/uniregistrar/uniregistrar/lib/tasks/file_upload_email_forward_task.py", line 29, in task_file_upload_email_forward | |
result = file_upload_email_forward(user_id, account_id, job_data) | |
File "/Users/jim/.virtualenv/unireg/lib/python2.7/site-packages/celery-3.1.8-py2.7.egg/celery/local.py", line 167, in <lambda> | |
__call__ = lambda x, *a, **kw: x._get_current_object()(*a, **kw) | |
File "/Users/jim/.virtualenv/unireg/lib/python2.7/site-packages/celery-3.1.8-py2.7.egg/celery/app/trace.py", line 417, in __protected_call__ | |
return orig(self, *args, **kwargs) | |
File "/Users/jim/.virtualenv/unireg/lib/python2.7/site-packages/celery-3.1.8-py2.7.egg/celery/app/task.py", line 419, in __call__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE account ( | |
id SERIAL NOT NULL UNIQUE, | |
name TEXT NOT NULL | |
); | |
CREATE TABLE credit_card ( | |
id SERIAL NOT NULL UNIQUE, | |
account_id INTEGER NOT NULL REFERENCES account(id), | |
card_number TEXT NOT NULL, | |
UNIQUE (account_id, id) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
from sqlalchemy import create_engine | |
from sqlalchemy.orm import sessionmaker | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy import Column | |
from sqlalchemy import ForeignKey | |
from sqlalchemy import ForeignKeyConstraint | |
from sqlalchemy.types import INTEGER | |
from sqlalchemy.types import TEXT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from pyramid.paster import bootstrap | |
stuff = bootstrap("development.ini") | |
import logging | |
logging.basicConfig(level=logging.DEBUG) | |
log = logging.getLogger(__name__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyramid.authentication import AuthTktAuthenticationPolicy | |
from pyramid.authorization import ACLAuthorizationPolicy | |
from myapp.tests.base import ViewTestBase | |
from myapp.views.authentication.login import login_view | |
from myapp.tests.helper import create_user | |
class LoginViewTests(ViewTestBase): | |
def setUp(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import unittest | |
from myapp.tests.helper import create_user | |
SQLALCHEMY_URL = "postgresql://unireg@localhost/myapp" | |
def _init_testing_db(): | |
from sqlalchemy import create_engine | |
from myapp.models import DBSession, Base | |
engine = create_engine(SQLALCHEMY_URL) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class StudentsController < ApplicationController | |
before_filter :find_student, only: [:show, :update] | |
def show | |
# @student will already be loaded here | |
# do whatever | |
end | |
private |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ uname -a | |
Darwin lemur.wired.fweep.com 12.3.0 Darwin Kernel Version 12.3.0: Sun Jan 6 22:37:10 PST 2013; root:xnu-2050.22.13~1/RELEASE_X86_64 x86_64 i386 MacBookAir4,2 Darwin | |
$ vim --version | |
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Mar 19 2013 10:54:27) | |
Included patches: 1-244, 246-762 | |
Compiled by jim@lemur.wired.lan.fweep.com | |
Huge version with GTK2 GUI. Features included (+) or not (-): | |
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent | |
+clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments |
NewerOlder