I ran into the same problem a while back. I assume you're using
sqlalchemy, right? I think the problem is that in the example test it
says this:
database.set_db_uri("sqlite:///:memory:")
when it should say this:
database.set_db_uri("sqlite:///:memory:", 'sqlalchemy')
And yes you probably want to use an in-memory throw-away database when
doing testing. Don't test on your real data, you might end up wiping
out important stuff!
This seems like a bug in "tg-admin quickstart --sqlalchemy", does
anyone know who's maintaining that?
hope this helps,
-Ian
On Apr 9, 10:30 am, "Disrupt07" <[EMAIL PROTECTED]> wrote:
> My root controller imports a database connection. I need to unit test
> this root controller.
>
> Using the nosetests is giving me an error such as the following:
> File "C:\Python24\Lib\site-packages\TurboGears-1.0.1-py2.4.egg
> \turbogears\database.py", line 39, in get_engine
> dburi = alch_args.pop('dburi')
> KeyError: 'pop(): dictionary is empty'
>
> How can I solve this? Should I call another database instance for
> unit testing?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---