Skip to content

Document use of the testsite for manual testing #16

Description

@PeterJCLaw

This appears to be possible and somewhat useful, though a little non-obvious given that it doesn't have migrations already generated.

In case it's useful, the steps I used were (approximately):

createdb testsite # (ask Postgres to create a bootstrap DB for the site)
export TEST_DATABASE_NAME=testsite

tests/testsite/manage.py makemigrations photofeed polls turtles
tests/testsite/manage.py migrate

tests/testsite/manage.py shell --command '
import datetime
from polls.models import Question
Question.objects.create(question_text="Who are you?", pub_date=datetime.datetime.now())
'

tests/testsite/manage.py devdata_export

TEST_DATABASE_NAME=testsite_import tests/testsite/manage.py devdata_import

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions