{"action":"created","issue":{"url":"https://api.github.com/repos/edx/edx-platform/issues/11060","labels_url":"https://api.github.com/repos/edx/edx-platform/issues/11060/labels{/name}","comments_url":"https://api.github.com/repos/edx/edx-platform/issues/11060/comments","events_url":"https://api.github.com/repos/edx/edx-platform/issues/11060/events","html_url":"https://github.com/edx/edx-platform/pull/11060","id":123745781,"number":11060,"title":"Make local test runs using paver run faster by not running migrations","user":{"login":"douglashall","id":224634,"avatar_url":"https://avatars.githubusercontent.com/u/224634?v=3","gravatar_id":"","url":"https://api.github.com/users/douglashall","html_url":"https://github.com/douglashall","followers_url":"https://api.github.com/users/douglashall/followers","following_url":"https://api.github.com/users/douglashall/following{/other_user}","gists_url":"https://api.github.com/users/douglashall/gists{/gist_id}","starred_url":"https://api.github.com/users/douglashall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/douglashall/subscriptions","organizations_url":"https://api.github.com/users/douglashall/orgs","repos_url":"https://api.github.com/users/douglashall/repos","events_url":"https://api.github.com/users/douglashall/events{/privacy}","received_events_url":"https://api.github.com/users/douglashall/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-24T01:55:18Z","updated_at":"2015-12-26T15:34:12Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/11060","html_url":"https://github.com/edx/edx-platform/pull/11060","diff_url":"https://github.com/edx/edx-platform/pull/11060.diff","patch_url":"https://github.com/edx/edx-platform/pull/11060.patch"},"body":"These changes allow for making the running of unit tests significantly faster in a devstack development environment. This is accomplished by providing an option to prevent all migrations from running during test setup and creating database tables directly from the model definitions. Before these changes we were preventing most migrations from running, but the ones that ran still took up a significant amount of time and made local test development quite painful.\r\n\r\nTest settings are split into three different files:\r\n\r\n**(cms,lms)/envs/test_base.py**\r\nContains what was previously in test.py minus the original MIGRATION_MODULES hack used to speed up testing runs by preventing *most* migrations.\r\n\r\n**(cms,lms)/envs/test.py**\r\nImports test_base.py and includes the original MIGRATION_MODULES hack.\r\n\r\n**(cms,lms)/envs/test_local.py**\r\nImports test_base.py and includes a new MIGRATION_MODULES hack which prevents *all* migrations.\r\n\r\nYou can now include a --settings option with the `paver test_system` command to specify the django settings you would like to use when running tests. The default for this option is `test` which uses the original MIGRATION_MODULES hack. By specifying this options as `--settings=test_local` you will see a ~15s decrease in the amount of time it takes to run tests."},"comment":{"url":"https://api.github.com/repos/edx/edx-platform/issues/comments/167334883","html_url":"https://github.com/edx/edx-platform/pull/11060#issuecomment-167334883","issue_url":"https://api.github.com/repos/edx/edx-platform/issues/11060","id":167334883,"user":{"login":"benpatterson","id":2004678,"avatar_url":"https://avatars.githubusercontent.com/u/2004678?v=3","gravatar_id":"","url":"https://api.github.com/users/benpatterson","html_url":"https://github.com/benpatterson","followers_url":"https://api.github.com/users/benpatterson/followers","following_url":"https://api.github.com/users/benpatterson/following{/other_user}","gists_url":"https://api.github.com/users/benpatterson/gists{/gist_id}","starred_url":"https://api.github.com/users/benpatterson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benpatterson/subscriptions","organizations_url":"https://api.github.com/users/benpatterson/orgs","repos_url":"https://api.github.com/users/benpatterson/repos","events_url":"https://api.github.com/users/benpatterson/events{/privacy}","received_events_url":"https://api.github.com/users/benpatterson/received_events","type":"User","site_admin":false},"created_at":"2015-12-26T15:34:12Z","updated_at":"2015-12-26T15:34:12Z","body":"Could we get an update in testing.rst as part of this?\r\n\r\nI'm still thinking through the \"CLI convention\" if you will. For example, should this be something else like `--local` instead? Also, I know we have some tables that need to be initialized with data...how does this approach tie into that?"}}