Skip to content

Commit

Permalink
Integ test nonce uses correct signal
Browse files Browse the repository at this point in the history
  • Loading branch information
numberoverzero committed Aug 12, 2016
1 parent f1ff20a commit d6f32d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 4 additions & 3 deletions tests/integ/conftest.py
Expand Up @@ -5,7 +5,7 @@
import random
import string

from bloop import Client, Engine, model_created
from bloop import Client, Engine, before_create_table

from .models import User

Expand All @@ -25,8 +25,8 @@ def pytest_addoption(parser):
def pytest_configure(config):
nonce = config.getoption("--nonce")

@model_created.connect_via(sender=blinker.ANY, weak=False)
def nonce_table_name(_, model, **__):
@before_create_table.connect_via(sender=blinker.ANY, weak=False)
def nonce_table_name(_, *, model, **__):
table_name = model.Meta.table_name
if nonce not in table_name:
model.Meta.table_name += nonce
Expand All @@ -35,6 +35,7 @@ def nonce_table_name(_, model, **__):
def pytest_unconfigure(config):
skip_cleanup = config.getoption("--skip-cleanup")
if skip_cleanup:
print("Skipping cleanup")
return
it = boto_client.get_paginator("list_tables").paginate()
tables = [response["TableNames"] for response in it]
Expand Down
1 change: 0 additions & 1 deletion tox.ini
Expand Up @@ -14,7 +14,6 @@ commands =
[testenv:integ]
passenv = AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY
deps = pytest
coverage
commands = py.test tests/integ []

[testenv:docs]
Expand Down

0 comments on commit d6f32d2

Please sign in to comment.