<commit_before># -*- coding: utf-8 -*-
from contextlib import closing
from pyramid import testing
import pytest
# from psycopg2 import DataError
# from psycopg2 import IntegrityError
import datetime
import os
from cryptacular.bcrypt import BCRYPTPasswordManager
import psycopg2

# from journal import Entry
# from journal import add2_entry
from sqlalchemy.exc import DataError, IntegrityError

DB_SCHEMA = """
CREATE TABLE IF NOT EXISTS entries (
    id serial PRIMARY KEY,
    title VARCHAR (127) NOT NULL,
    text TEXT NOT NULL,
    created TIMESTAMP NOT NULL
)
"""
INSERT_ENTRY = """
INSERT INTO entries(title, text, created) VALUES (%s, %s, %s)
"""
# READ_ENTRIES = """
# SELECT * FROM entries
# """
SELECT_ENTRIES = """
SELECT id, title, text, created FROM entries ORDER BY created DESC
"""

# TEST_DSN = 'postgresql://mark:@localhost:5432/learning-journal'
TEST_DSN = 'postgresql://postgres:@localhost:5432/travis_ci_test;'
<commit_msg>Remove typo in test_journal_orm TEST_DSN.<commit_after># -*- coding: utf-8 -*-
from contextlib import closing
from pyramid import testing
import pytest
# from psycopg2 import DataError
# from psycopg2 import IntegrityError
import datetime
import os
from cryptacular.bcrypt import BCRYPTPasswordManager
import psycopg2

# from journal import Entry
# from journal import add2_entry
from sqlalchemy.exc import DataError, IntegrityError

DB_SCHEMA = """
CREATE TABLE IF NOT EXISTS entries (
    id serial PRIMARY KEY,
    title VARCHAR (127) NOT NULL,
    text TEXT NOT NULL,
    created TIMESTAMP NOT NULL
)
"""
INSERT_ENTRY = """
INSERT INTO entries(title, text, created) VALUES (%s, %s, %s)
"""
# READ_ENTRIES = """
# SELECT * FROM entries
# """
SELECT_ENTRIES = """
SELECT id, title, text, created FROM entries ORDER BY created DESC
"""

# TEST_DSN = 'postgresql://mark:@localhost:5432/learning-journal'
TEST_DSN = 'postgresql://postgres:@localhost:5432/travis_ci_test'

{'fraction_non_alphanumeric': 0.09932043910088866, 'fraction_numerical': 0.0167276529012023, 'mean_word_length': 4.944099378881988, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7179028', 'n_tokens_mistral': 626, 'n_tokens_neox': 591, 'n_words': 200}