On Saturday 18 of September 2010 12:54:25 andrew cooke wrote:
> Hi,
>
> Could you clarify whether multiple databases are supported in 1.2?
> There's a comment at http://devel.almad.net/trac/django-sane-testing/
> that suggests yes, but the issue in the Trac is still open and I
> couldn't see any related commits.
Well, I'm not using multiple rdbms, so I forgot about it.
I hacked *some* support in multidb branch now for You, could You please test
it?
http://github.com/Almad/django-sane-testing/tree/multidb
API should be same as in Django, so multi_db=True testcase attribute forces
flush on all specified databases.
I don't like how it is done nor how it's tested, but this relates to "multiple
data source resets for test isolation" I have in mind and was planning for
0.6.
If it works, I'll probably release yet another release as 0.5 (also to get
twill support out) and refactor it later. Please let me know if You have some
more complicated setup involving multidb.
I also have to think about "multiple data source API" more, I'll probably post
some thoughts to this list before I'm going to write it. My plan is to start
with it in ~ 2 weeks, but I cannot guarantee anything.
> For example, my settings.py has DATABASES = {....} which is not
> handled by the Django Selenium test runner package.
>
> Also, I have had success beating spam on Google Groups (... *snip*)
Done, thanks. I'll see how big the workload will be.
> Anyway, thanks for the work you've put into this package,
Hope it helps ;)
> Andrew
Almad
Yes, sorry about that. But I plan to migrate dst to my now-usual toolchain
that provides easier (and continuous) releases...and also, github has far
broader community than bitbucket now :(
almad@namtar ~/tmp $ git clone http://github.com/Almad/django-sane-testing.git
Cloning into django-sane-testing...
remote: Counting objects: 807, done.
remote: Compressing objects: 100% (753/753), done.
remote: Total 807 (delta 267), reused 558 (delta 50)
Receiving objects: 100% (807/807), 236.29 KiB | 28 KiB/s, done.
Resolving deltas: 100% (267/267), done.
almad@namtar ~/tmp $ cd django-sane-testing/
almad@namtar ~/tmp/django-sane-testing $ git checkout -b multidb
origin/multidb
Branch multidb set up to track remote branch multidb from origin.
Switched to a new branch 'multidb'
almad@namtar ~/tmp/django-sane-testing $
or You can just
(dist)almad@namtar ~/tmp/dist $ pip install -e
git+http://github.com/Almad/django-sane-
testing.git@multidb#egg=djangosanetesting
Obtaining djangosanetesting from git+http://github.com/Almad/django-sane-
testing.git@multidb#egg=djangosanetesting
Cloning http://github.com/Almad/django-sane-testing.git (to multidb) to
./src/djangosanetesting
Running setup.py egg_info for package djangosanetesting
Installing collected packages: djangosanetesting
Running setup.py develop for djangosanetesting
Creating /home/almad/tmp/dist/lib/python2.6/site-
packages/djangosanetesting.egg-link (link to .)
Adding djangosanetesting 0.5.6 to easy-install.pth file
Installed /home/almad/tmp/dist/src/djangosanetesting
Successfully installed djangosanetesting
Cleaning up...
(dist)almad@namtar ~/tmp/dist $
> Andrew
Almad