Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Configure project using yaml config #5

Merged
merged 14 commits into from Mar 14, 2014

Conversation

Projects
None yet
2 participants
Member

miltontony commented Mar 6, 2014

No description provided.

@jerith jerith and 1 other commented on an outdated diff Mar 7, 2014

script:
- - coverage run --source=shortener `which trial` shortener
+ - SHORTENER_TEST_CONNECTION_STRING='postgresql://postgres@localhost:5432/shortener_test' coverage run --source=shortener `which trial` shortener
@jerith

jerith Mar 7, 2014

Member

You should keep both postgres and sqlite test runs here. They don't take very long and it ensures you don't accidentally make something db-specific. (Only run coverage on one, though.)

@miltontony

miltontony Mar 7, 2014

Member

@jerith Had some issue with sqlite. The _drop_tables doesn't seem to work. Can you help debug that? test_account_init() fails with sqlite.

@jerith

jerith Mar 11, 2014

Member

_drop_tables() uses a separate database connection, which means that with a sqlite in-memory database it operates on a different database. Rather create the tables at the beginning of each test using the database layer directly instead of going through the API.

Member

jerith commented Mar 7, 2014

I'm not enthusiastic about shipping a config file with the code. I'd rather put an example in the documentation (the README will do for now) and deploy the configs with puppet in production.

@jerith jerith commented on an outdated diff Mar 11, 2014

shortener/tests/test_api.py
config=cfg
)
site = Site(self.service.app.resource())
self.listener = reactor.listenTCP(0, site, interface='localhost')
self.listener_port = self.listener.getHost().port
- self._drop_tables()
@jerith

jerith Mar 11, 2014

Member

You still want the _drop_tables() call in here to make sure each test starts with a clean database.

Member

jerith commented Mar 11, 2014

One comment, 👍 when that's fixed and Travis is happy.

@miltontony miltontony merged commit 859a9e6 into develop Mar 14, 2014

1 check was pending

default The Travis CI build is in progress
Details

@miltontony miltontony deleted the feature/issue-5-use-yaml-config branch Mar 22, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment