Skip to content

Instantly share code, notes, and snippets.

@hannesstruss
Created December 2, 2013 18:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hannesstruss/f60e038daa588318ea57 to your computer and use it in GitHub Desktop.
Save hannesstruss/f60e038daa588318ea57 to your computer and use it in GitHub Desktop.
File "/home/vagrant/test-factory-boy/test_factory_boy/test_cases.py", line 12, in test_factory
ModelFactory.build()
File "/home/vagrant/test-factory-boy/venv/lib/python2.6/site-packages/factory/base.py", line 496, in build
attrs = cls.attributes(create=False, extra=kwargs)
File "/home/vagrant/test-factory-boy/venv/lib/python2.6/site-packages/factory/base.py", line 363, in attributes
force_sequence=force_sequence,
File "/home/vagrant/test-factory-boy/venv/lib/python2.6/site-packages/factory/containers.py", line 264, in build
sequence = self.factory._generate_next_sequence()
File "/home/vagrant/test-factory-boy/venv/lib/python2.6/site-packages/factory/base.py", line 336, in _generate_next_sequence
cls._setup_counter()
File "/home/vagrant/test-factory-boy/venv/lib/python2.6/site-packages/factory/base.py", line 316, in _setup_counter
first_seq = cls._setup_next_sequence()
File "/home/vagrant/test-factory-boy/venv/lib/python2.6/site-packages/factory/django.py", line 92, in _setup_next_sequence
).order_by('-pk')[0]
File "/home/vagrant/test-factory-boy/venv/lib/python2.6/site-packages/django/db/models/query.py", line 132, in __getitem__
return list(qs)[0]
File "/home/vagrant/test-factory-boy/venv/lib/python2.6/site-packages/django/db/models/query.py", line 96, in __iter__
self._fetch_all()
File "/home/vagrant/test-factory-boy/venv/lib/python2.6/site-packages/django/db/models/query.py", line 854, in _fetch_all
self._result_cache = list(self.iterator())
File "/home/vagrant/test-factory-boy/venv/lib/python2.6/site-packages/django/db/models/query.py", line 1065, in iterator
for row in self.query.get_compiler(self.db).results_iter():
File "/home/vagrant/test-factory-boy/venv/lib/python2.6/site-packages/django/db/models/sql/compiler.py", line 710, in results_iter
for rows in self.execute_sql(MULTI):
File "/home/vagrant/test-factory-boy/venv/lib/python2.6/site-packages/django/db/models/sql/compiler.py", line 780, in execute_sql
cursor = self.connection.cursor()
File "/home/vagrant/test-factory-boy/venv/lib/python2.6/site-packages/django/db/backends/__init__.py", line 159, in cursor
cursor = util.CursorWrapper(self._cursor(), self)
File "/home/vagrant/test-factory-boy/venv/lib/python2.6/site-packages/pytest_django/plugin.py", line 227, in _blocking_wrapper
pytest.fail('Database access not allowed, '
File "/home/vagrant/test-factory-boy/venv/lib/python2.6/site-packages/_pytest/runner.py", line 448, in fail
raise Failed(msg=msg, pytrace=pytrace)
Failed: Database access not allowed, use the "django_db" mark to enable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment