Hi --

I wanted to write some tests on my model that would depend on my real
database.  I eventually figured out that the database.set_db_uri(...)
line needed to preced the import model line in order to make sure that
my real database

The testutil.DBTest has a built-in teardown method that attempts to
delete every table.  This is not good if I am going to use a real
database!

Meanwhile, when I used sqlite to write some other tests and I ran into
a different problem. My model has this line in it:

short_descriptionIndex =
DatabaseIndex({'expression':'lower(short_description)'}, unique=True)

which gets translated into this SQL:

CREATE UNIQUE INDEX category_short_descriptionIndex ON category
(lower(short_description))

That statement is valid in postgres but not in sqlite.  sqlite
complained about a syntax error.

I'm not posting this to complain pointlessly.  I'm happy to work on
the solution if others agree that these are problems.

Maybe I'm just using the framework incorrectly.

Matt
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to