HI Ashish, Looking at the django code and errors thrown, we might be able to add our own "create_test_db" method in the db/backends/posgresql_psycopg2/creation.py file. In there we just need to create a copy of the Arches db. We have most of the code to do that already. Hope that helps, Alexei
Director of Web Development - Farallon Geographics, Inc. - 971.227.3173 On Thu, Mar 20, 2014 at 5:13 PM, Alexei Peters <[email protected]> wrote: > Hi Ashish, > There's a couple of issues here: > 1. It doesn't look like you activated the virtual environment. You need > to do that before running the command python manage.py test like so: > > source "archesproject/virtualenv/ENV/bin/activate" > python manage.py test > > 2. Even if you do the above, you'll run into a larger issue, which is that > Arches uses postgres schemas. Schemas aren't officially supported by > django. We made it work by modifying a couple of the core django modules > (you can find the modified files in the install folder called base.py and > inspectdb.py). I think django is trying to setup a test database but that > will fail at the line that we added in base.py that set's the search path. > You'll need to find a work around. > > Good luck and let me know if you need anything else. > Cheers, > Alexei > > > Director of Web Development - Farallon Geographics, Inc. - 971.227.3173 > > > On Thu, Mar 20, 2014 at 4:53 PM, Ashish Kumar <[email protected]>wrote: > >> Hello, >> I am trying to write tests for Arches But i am new to Postgres in >> django,i have written a simple test suppose of adding two numbers,but i >> don't know how to run it. >> >> Here is my simple test for adding two numbers tests.py in >> archesproject->arches folder test <http://pastebin.com/qgb1XJFh> >> I have tried for python manage.py test but it gives me following error >> error <http://pastebin.com/t5TSg5aq> >> >> Please help me in getting started with this,it is blocking me from >> further implementation . >> >> Hoping for a quick response. >> >> Thanks, >> Ashish Kumar >> >> -- >> -- To post, send email to [email protected]. To >> unsubscribe, send email to [email protected]. >> For more information, visit >> https://groups.google.com/d/forum/archesproject?hl=en >> --- >> You received this message because you are subscribed to the Google Groups >> "Arches Project" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/d/optout. >> > > -- -- To post, send email to [email protected]. To unsubscribe, send email to [email protected]. For more information, visit https://groups.google.com/d/forum/archesproject?hl=en --- You received this message because you are subscribed to the Google Groups "Arches Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
