1. Tane Piper
  2. hgfront

Commits

Miran Lipovača  committed bef581e

+ Added more test coverage, updated fixtures

  • Participants
  • Parent commits a9364ac
  • Branches default

Comments (0)

Files changed (2)

File data.json

View file
  • Ignore whitespace
-[
-    {
-        "pk": 2, 
-        "model": "admin.logentry", 
-        "fields": {
-            "action_flag": 1, 
-            "action_time": "2008-02-05 23:43:46", 
-            "object_repr": "The Manhattan Project", 
-            "object_id": "1", 
-            "change_message": "", 
-            "user": 1, 
-            "content_type": 15
-        }
-    }, 
-    {
-        "pk": 1, 
-        "model": "admin.logentry", 
-        "fields": {
-            "action_flag": 2, 
-            "action_time": "2008-02-05 23:35:53", 
-            "object_repr": "test_admin", 
-            "object_id": "2", 
-            "change_message": "Changed staff status, active and superuser status.", 
-            "user": 1, 
-            "content_type": 4
-        }
-    }, 
-    {
-        "pk": 1, 
-        "model": "auth.user", 
-        "fields": {
-            "username": "alisic", 
-            "first_name": "", 
-            "last_name": "", 
-            "is_active": true, 
-            "is_superuser": true, 
-            "is_staff": true, 
-            "last_login": "2008-02-07 14:46:11", 
-            "groups": [], 
-            "user_permissions": [], 
-            "password": "sha1$5930f$7fbcbdef9aaedc15d4a85e65fd92c83de702427c", 
-            "email": "sav@asv.as", 
-            "date_joined": "2008-02-05 22:56:50"
-        }
-    }, 
-    {
-        "pk": 2, 
-        "model": "auth.user", 
-        "fields": {
-            "username": "test_admin", 
-            "first_name": "", 
-            "last_name": "", 
-            "is_active": true, 
-            "is_superuser": true, 
-            "is_staff": true, 
-            "last_login": "2008-02-05 23:35:31", 
-            "groups": [], 
-            "user_permissions": [], 
-            "password": "sha1$3bdad$b068868ecce02f5db7ee7f2907566ca0f918aab9", 
-            "email": "", 
-            "date_joined": "2008-02-05 23:35:31"
-        }
-    }, 
-    {
-        "pk": 1, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "add_logentry", 
-            "name": "Can add log entry", 
-            "content_type": 1
-        }
-    }, 
-    {
-        "pk": 2, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "change_logentry", 
-            "name": "Can change log entry", 
-            "content_type": 1
-        }
-    }, 
-    {
-        "pk": 3, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "delete_logentry", 
-            "name": "Can delete log entry", 
-            "content_type": 1
-        }
-    }, 
-    {
-        "pk": 4, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "add_message", 
-            "name": "Can add message", 
-            "content_type": 2
-        }
-    }, 
-    {
-        "pk": 5, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "change_message", 
-            "name": "Can change message", 
-            "content_type": 2
-        }
-    }, 
-    {
-        "pk": 6, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "delete_message", 
-            "name": "Can delete message", 
-            "content_type": 2
-        }
-    }, 
-    {
-        "pk": 7, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "add_group", 
-            "name": "Can add group", 
-            "content_type": 3
-        }
-    }, 
-    {
-        "pk": 8, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "change_group", 
-            "name": "Can change group", 
-            "content_type": 3
-        }
-    }, 
-    {
-        "pk": 9, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "delete_group", 
-            "name": "Can delete group", 
-            "content_type": 3
-        }
-    }, 
-    {
-        "pk": 10, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "add_user", 
-            "name": "Can add user", 
-            "content_type": 4
-        }
-    }, 
-    {
-        "pk": 11, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "change_user", 
-            "name": "Can change user", 
-            "content_type": 4
-        }
-    }, 
-    {
-        "pk": 12, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "delete_user", 
-            "name": "Can delete user", 
-            "content_type": 4
-        }
-    }, 
-    {
-        "pk": 13, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "add_permission", 
-            "name": "Can add permission", 
-            "content_type": 5
-        }
-    }, 
-    {
-        "pk": 14, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "change_permission", 
-            "name": "Can change permission", 
-            "content_type": 5
-        }
-    }, 
-    {
-        "pk": 15, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "delete_permission", 
-            "name": "Can delete permission", 
-            "content_type": 5
-        }
-    }, 
-    {
-        "pk": 16, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "add_contenttype", 
-            "name": "Can add content type", 
-            "content_type": 6
-        }
-    }, 
-    {
-        "pk": 17, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "change_contenttype", 
-            "name": "Can change content type", 
-            "content_type": 6
-        }
-    }, 
-    {
-        "pk": 18, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "delete_contenttype", 
-            "name": "Can delete content type", 
-            "content_type": 6
-        }
-    }, 
-    {
-        "pk": 19, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "add_session", 
-            "name": "Can add session", 
-            "content_type": 7
-        }
-    }, 
-    {
-        "pk": 20, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "change_session", 
-            "name": "Can change session", 
-            "content_type": 7
-        }
-    }, 
-    {
-        "pk": 21, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "delete_session", 
-            "name": "Can delete session", 
-            "content_type": 7
-        }
-    }, 
-    {
-        "pk": 22, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "add_site", 
-            "name": "Can add site", 
-            "content_type": 8
-        }
-    }, 
-    {
-        "pk": 23, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "change_site", 
-            "name": "Can change site", 
-            "content_type": 8
-        }
-    }, 
-    {
-        "pk": 24, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "delete_site", 
-            "name": "Can delete site", 
-            "content_type": 8
-        }
-    }, 
-    {
-        "pk": 25, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "add_setting", 
-            "name": "Can add setting", 
-            "content_type": 9
-        }
-    }, 
-    {
-        "pk": 26, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "change_setting", 
-            "name": "Can change setting", 
-            "content_type": 9
-        }
-    }, 
-    {
-        "pk": 27, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "delete_setting", 
-            "name": "Can delete setting", 
-            "content_type": 9
-        }
-    }, 
-    {
-        "pk": 28, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "add_projectbackup", 
-            "name": "Can add project backup", 
-            "content_type": 10
-        }
-    }, 
-    {
-        "pk": 29, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "change_projectbackup", 
-            "name": "Can change project backup", 
-            "content_type": 10
-        }
-    }, 
-    {
-        "pk": 30, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "delete_projectbackup", 
-            "name": "Can delete project backup", 
-            "content_type": 10
-        }
-    }, 
-    {
-        "pk": 31, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "add_issuetype", 
-            "name": "Can add issue type", 
-            "content_type": 11
-        }
-    }, 
-    {
-        "pk": 32, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "change_issuetype", 
-            "name": "Can change issue type", 
-            "content_type": 11
-        }
-    }, 
-    {
-        "pk": 33, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "delete_issuetype", 
-            "name": "Can delete issue type", 
-            "content_type": 11
-        }
-    }, 
-    {
-        "pk": 34, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "add_issueseverity", 
-            "name": "Can add issue severity", 
-            "content_type": 12
-        }
-    }, 
-    {
-        "pk": 35, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "change_issueseverity", 
-            "name": "Can change issue severity", 
-            "content_type": 12
-        }
-    }, 
-    {
-        "pk": 36, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "delete_issueseverity", 
-            "name": "Can delete issue severity", 
-            "content_type": 12
-        }
-    }, 
-    {
-        "pk": 37, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "add_issue", 
-            "name": "Can add issue", 
-            "content_type": 13
-        }
-    }, 
-    {
-        "pk": 40, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "can_edit_issue_settings", 
-            "name": "Can edit issue settings", 
-            "content_type": 13
-        }
-    }, 
-    {
-        "pk": 38, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "change_issue", 
-            "name": "Can change issue", 
-            "content_type": 13
-        }
-    }, 
-    {
-        "pk": 39, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "delete_issue", 
-            "name": "Can delete issue", 
-            "content_type": 13
-        }
-    }, 
-    {
-        "pk": 41, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "add_issuestatus", 
-            "name": "Can add issue status", 
-            "content_type": 14
-        }
-    }, 
-    {
-        "pk": 42, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "change_issuestatus", 
-            "name": "Can change issue status", 
-            "content_type": 14
-        }
-    }, 
-    {
-        "pk": 43, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "delete_issuestatus", 
-            "name": "Can delete issue status", 
-            "content_type": 14
-        }
-    }, 
-    {
-        "pk": 44, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "add_project", 
-            "name": "Can add project", 
-            "content_type": 15
-        }
-    }, 
-    {
-        "pk": 47, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "can_edit_project_settings", 
-            "name": "Can edit project settings", 
-            "content_type": 15
-        }
-    }, 
-    {
-        "pk": 45, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "change_project", 
-            "name": "Can change project", 
-            "content_type": 15
-        }
-    }, 
-    {
-        "pk": 46, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "delete_project", 
-            "name": "Can delete project", 
-            "content_type": 15
-        }
-    }, 
-    {
-        "pk": 48, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "add_projectnews", 
-            "name": "Can add project news item", 
-            "content_type": 16
-        }
-    }, 
-    {
-        "pk": 49, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "change_projectnews", 
-            "name": "Can change project news item", 
-            "content_type": 16
-        }
-    }, 
-    {
-        "pk": 50, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "delete_projectnews", 
-            "name": "Can delete project news item", 
-            "content_type": 16
-        }
-    }, 
-    {
-        "pk": 51, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "add_projectpermissionset", 
-            "name": "Can add project permission set", 
-            "content_type": 17
-        }
-    }, 
-    {
-        "pk": 52, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "change_projectpermissionset", 
-            "name": "Can change project permission set", 
-            "content_type": 17
-        }
-    }, 
-    {
-        "pk": 53, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "delete_projectpermissionset", 
-            "name": "Can delete project permission set", 
-            "content_type": 17
-        }
-    }, 
-    {
-        "pk": 54, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "add_repo", 
-            "name": "Can add repo", 
-            "content_type": 18
-        }
-    }, 
-    {
-        "pk": 55, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "change_repo", 
-            "name": "Can change repo", 
-            "content_type": 18
-        }
-    }, 
-    {
-        "pk": 56, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "delete_repo", 
-            "name": "Can delete repo", 
-            "content_type": 18
-        }
-    }, 
-    {
-        "pk": 57, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "add_page", 
-            "name": "Can add page", 
-            "content_type": 19
-        }
-    }, 
-    {
-        "pk": 58, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "change_page", 
-            "name": "Can change page", 
-            "content_type": 19
-        }
-    }, 
-    {
-        "pk": 59, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "delete_page", 
-            "name": "Can delete page", 
-            "content_type": 19
-        }
-    }, 
-    {
-        "pk": 60, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "add_pagechange", 
-            "name": "Can add page change", 
-            "content_type": 20
-        }
-    }, 
-    {
-        "pk": 61, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "change_pagechange", 
-            "name": "Can change page change", 
-            "content_type": 20
-        }
-    }, 
-    {
-        "pk": 62, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "delete_pagechange", 
-            "name": "Can delete page change", 
-            "content_type": 20
-        }
-    }, 
-    {
-        "pk": 63, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "add_registrationprofile", 
-            "name": "Can add registration profile", 
-            "content_type": 21
-        }
-    }, 
-    {
-        "pk": 64, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "change_registrationprofile", 
-            "name": "Can change registration profile", 
-            "content_type": 21
-        }
-    }, 
-    {
-        "pk": 65, 
-        "model": "auth.permission", 
-        "fields": {
-            "codename": "delete_registrationprofile", 
-            "name": "Can delete registration profile", 
-            "content_type": 21
-        }
-    }, 
-    {
-        "pk": 6, 
-        "model": "contenttypes.contenttype", 
-        "fields": {
-            "model": "contenttype", 
-            "name": "content type", 
-            "app_label": "contenttypes"
-        }
-    }, 
-    {
-        "pk": 3, 
-        "model": "contenttypes.contenttype", 
-        "fields": {
-            "model": "group", 
-            "name": "group", 
-            "app_label": "auth"
-        }
-    }, 
-    {
-        "pk": 13, 
-        "model": "contenttypes.contenttype", 
-        "fields": {
-            "model": "issue", 
-            "name": "issue", 
-            "app_label": "issue"
-        }
-    }, 
-    {
-        "pk": 12, 
-        "model": "contenttypes.contenttype", 
-        "fields": {
-            "model": "issueseverity", 
-            "name": "issue severity", 
-            "app_label": "issue"
-        }
-    }, 
-    {
-        "pk": 14, 
-        "model": "contenttypes.contenttype", 
-        "fields": {
-            "model": "issuestatus", 
-            "name": "issue status", 
-            "app_label": "issue"
-        }
-    }, 
-    {
-        "pk": 11, 
-        "model": "contenttypes.contenttype", 
-        "fields": {
-            "model": "issuetype", 
-            "name": "issue type", 
-            "app_label": "issue"
-        }
-    }, 
-    {
-        "pk": 1, 
-        "model": "contenttypes.contenttype", 
-        "fields": {
-            "model": "logentry", 
-            "name": "log entry", 
-            "app_label": "admin"
-        }
-    }, 
-    {
-        "pk": 2, 
-        "model": "contenttypes.contenttype", 
-        "fields": {
-            "model": "message", 
-            "name": "message", 
-            "app_label": "auth"
-        }
-    }, 
-    {
-        "pk": 19, 
-        "model": "contenttypes.contenttype", 
-        "fields": {
-            "model": "page", 
-            "name": "page", 
-            "app_label": "wiki"
-        }
-    }, 
-    {
-        "pk": 20, 
-        "model": "contenttypes.contenttype", 
-        "fields": {
-            "model": "pagechange", 
-            "name": "page change", 
-            "app_label": "wiki"
-        }
-    }, 
-    {
-        "pk": 5, 
-        "model": "contenttypes.contenttype", 
-        "fields": {
-            "model": "permission", 
-            "name": "permission", 
-            "app_label": "auth"
-        }
-    }, 
-    {
-        "pk": 15, 
-        "model": "contenttypes.contenttype", 
-        "fields": {
-            "model": "project", 
-            "name": "project", 
-            "app_label": "project"
-        }
-    }, 
-    {
-        "pk": 10, 
-        "model": "contenttypes.contenttype", 
-        "fields": {
-            "model": "projectbackup", 
-            "name": "project backup", 
-            "app_label": "backup"
-        }
-    }, 
-    {
-        "pk": 16, 
-        "model": "contenttypes.contenttype", 
-        "fields": {
-            "model": "projectnews", 
-            "name": "project news item", 
-            "app_label": "project"
-        }
-    }, 
-    {
-        "pk": 17, 
-        "model": "contenttypes.contenttype", 
-        "fields": {
-            "model": "projectpermissionset", 
-            "name": "project permission set", 
-            "app_label": "project"
-        }
-    }, 
-    {
-        "pk": 21, 
-        "model": "contenttypes.contenttype", 
-        "fields": {
-            "model": "registrationprofile", 
-            "name": "registration profile", 
-            "app_label": "registration"
-        }
-    }, 
-    {
-        "pk": 18, 
-        "model": "contenttypes.contenttype", 
-        "fields": {
-            "model": "repo", 
-            "name": "repo", 
-            "app_label": "repo"
-        }
-    }, 
-    {
-        "pk": 7, 
-        "model": "contenttypes.contenttype", 
-        "fields": {
-            "model": "session", 
-            "name": "session", 
-            "app_label": "sessions"
-        }
-    }, 
-    {
-        "pk": 9, 
-        "model": "contenttypes.contenttype", 
-        "fields": {
-            "model": "setting", 
-            "name": "setting", 
-            "app_label": "config"
-        }
-    }, 
-    {
-        "pk": 8, 
-        "model": "contenttypes.contenttype", 
-        "fields": {
-            "model": "site", 
-            "name": "site", 
-            "app_label": "sites"
-        }
-    }, 
-    {
-        "pk": 4, 
-        "model": "contenttypes.contenttype", 
-        "fields": {
-            "model": "user", 
-            "name": "user", 
-            "app_label": "auth"
-        }
-    }, 
-    {
-        "pk": "24505bce11c98e813acb4a4ddc8a5075", 
-        "model": "sessions.session", 
-        "fields": {
-            "expire_date": "2008-02-19 23:33:17", 
-            "session_data": "gAJ9cQEoVRJfYXV0aF91c2VyX2JhY2tlbmRxAlUpZGphbmdvLmNvbnRyaWIuYXV0aC5iYWNrZW5k\ncy5Nb2RlbEJhY2tlbmRxA1UNX2F1dGhfdXNlcl9pZHEEigEBdS5hMzZmZjA0ZDkxN2MxYzYwYjI1\nYmJmNGYwNGFjODBjMQ==\n"
-        }
-    }, 
-    {
-        "pk": "396a9fae5df13a736866b5c40ed9094a", 
-        "model": "sessions.session", 
-        "fields": {
-            "expire_date": "2008-02-21 14:57:29", 
-            "session_data": "gAJ9cQEuMWIxODRmOTRiNjk5M2E2NjVmYWUwNDU5ODMwZTQxZjE=\n"
-        }
-    }, 
-    {
-        "pk": 1, 
-        "model": "sites.site", 
-        "fields": {
-            "domain": "example.com", 
-            "name": "example.com"
-        }
-    }, 
-    {
-        "pk": 1, 
-        "model": "config.setting", 
-        "fields": {
-            "class_name": "Issue", 
-            "module_name": "hgfront.issue.models", 
-            "attribute_name": "issues_per_page", 
-            "site": 1, 
-            "value": "20"
-        }
-    }, 
-    {
-        "pk": 2, 
-        "model": "config.setting", 
-        "fields": {
-            "class_name": "Project", 
-            "module_name": "hgfront.project.models", 
-            "attribute_name": "repository_directory", 
-            "site": 1, 
-            "value": "\/home\/alisic\/repos"
-        }
-    }, 
-    {
-        "pk": 3, 
-        "model": "config.setting", 
-        "fields": {
-            "class_name": "Project", 
-            "module_name": "hgfront.project.models", 
-            "attribute_name": "site_owner", 
-            "site": 1, 
-            "value": "the site own0r"
-        }
-    }, 
-    {
-        "pk": 4, 
-        "model": "config.setting", 
-        "fields": {
-            "class_name": "Project", 
-            "module_name": "hgfront.project.models", 
-            "attribute_name": "backups_directory", 
-            "site": 1, 
-            "value": "\/home\/alisic\/repos\/backups"
-        }
-    }, 
-    {
-        "pk": 5, 
-        "model": "config.setting", 
-        "fields": {
-            "class_name": "Project", 
-            "module_name": "hgfront.project.models", 
-            "attribute_name": "backups_max_days", 
-            "site": 1, 
-            "value": "0"
-        }
-    }, 
-    {
-        "pk": 6, 
-        "model": "config.setting", 
-        "fields": {
-            "class_name": "Issue", 
-            "module_name": "hgfront.issue.models", 
-            "attribute_name": "issue_from_email", 
-            "site": 1, 
-            "value": "bla@bla.com"
-        }
-    }, 
-    {
-        "pk": 7, 
-        "model": "config.setting", 
-        "fields": {
-            "class_name": "Project", 
-            "module_name": "hgfront.project.models", 
-            "attribute_name": "site_name", 
-            "site": 1, 
-            "value": "The site name"
-        }
-    }, 
-    {
-        "pk": 1, 
-        "model": "issue.issuetype", 
-        "fields": {
-            "order": 0, 
-            "is_active": true, 
-            "slug": "bug", 
-            "title": "Bug"
-        }
-    }, 
-    {
-        "pk": 2, 
-        "model": "issue.issuetype", 
-        "fields": {
-            "order": 1, 
-            "is_active": true, 
-            "slug": "enhancement", 
-            "title": "Enhancement"
-        }
-    }, 
-    {
-        "pk": 3, 
-        "model": "issue.issuetype", 
-        "fields": {
-            "order": 2, 
-            "is_active": true, 
-            "slug": "feature-request", 
-            "title": "Feature Request"
-        }
-    }, 
-    {
-        "pk": 4, 
-        "model": "issue.issuetype", 
-        "fields": {
-            "order": 3, 
-            "is_active": true, 
-            "slug": "typo", 
-            "title": "Typo"
-        }
-    }, 
-    {
-        "pk": 1, 
-        "model": "issue.issueseverity", 
-        "fields": {
-            "order": 0, 
-            "is_active": true, 
-            "slug": "minor", 
-            "title": "Minor"
-        }
-    }, 
-    {
-        "pk": 2, 
-        "model": "issue.issueseverity", 
-        "fields": {
-            "order": 1, 
-            "is_active": true, 
-            "slug": "medium", 
-            "title": "Medium"
-        }
-    }, 
-    {
-        "pk": 3, 
-        "model": "issue.issueseverity", 
-        "fields": {
-            "order": 2, 
-            "is_active": true, 
-            "slug": "major", 
-            "title": "Major"
-        }
-    }, 
-    {
-        "pk": 4, 
-        "model": "issue.issueseverity", 
-        "fields": {
-            "order": 3, 
-            "is_active": true, 
-            "slug": "critical", 
-            "title": "Critical"
-        }
-    }, 
-    {
-        "pk": 5, 
-        "model": "issue.issueseverity", 
-        "fields": {
-            "order": 4, 
-            "is_active": true, 
-            "slug": "blocker", 
-            "title": "Blocker"
-        }
-    }, 
-    {
-        "pk": 1, 
-        "model": "issue.issuestatus", 
-        "fields": {
-            "order": 0, 
-            "is_active": true, 
-            "slug": "raised", 
-            "title": "Raised"
-        }
-    }, 
-    {
-        "pk": 2, 
-        "model": "issue.issuestatus", 
-        "fields": {
-            "order": 1, 
-            "is_active": true, 
-            "slug": "accepted", 
-            "title": "Accepted"
-        }
-    }, 
-    {
-        "pk": 3, 
-        "model": "issue.issuestatus", 
-        "fields": {
-            "order": 2, 
-            "is_active": true, 
-            "slug": "not-accepted", 
-            "title": "Not Accepted"
-        }
-    }, 
-    {
-        "pk": 4, 
-        "model": "issue.issuestatus", 
-        "fields": {
-            "order": 3, 
-            "is_active": true, 
-            "slug": "fixed", 
-            "title": "Fixed"
-        }
-    }, 
-    {
-        "pk": 5, 
-        "model": "issue.issuestatus", 
-        "fields": {
-            "order": 4, 
-            "is_active": true, 
-            "slug": "works-for-me", 
-            "title": "Works For Me"
-        }
-    }, 
-    {
-        "pk": 1, 
-        "model": "project.project", 
-        "fields": {
-            "hgweb_style": "default", 
-            "pub_date": "2008-02-06 00:43:40", 
-            "name_short": "manhattan", 
-            "description_long": "no desc", 
-            "user_owner": 2, 
-            "description_short": "no desc", 
-            "name_long": "The Manhattan Project"
-        }
-    }, 
-    {
-        "pk": 1, 
-        "model": "project.projectpermissionset", 
-        "fields": {
-            "edit_repos": false, 
-            "project": 1, 
-            "user_accepted": true, 
-            "delete_members": false, 
-            "delete_issues": false, 
-            "view_project": true, 
-            "view_repos": true, 
-            "edit_issues": false, 
-            "edit_project": false, 
-            "edit_wiki": false, 
-            "add_wiki": false, 
-            "is_default": true, 
-            "view_issues": true, 
-            "add_issues": false, 
-            "owner_accepted": true, 
-            "view_wiki": true, 
-            "delete_repos": false, 
-            "add_repos": false, 
-            "delete_wiki": false, 
-            "add_members": false, 
-            "user": null
-        }
-    }, 
-    {
-        "pk": 1, 
-        "model": "wiki.page", 
-        "fields": {
-            "content": "This is the main wiki page for this project, write something here!", 
-            "parent_project": 1, 
-            "name": "Main_Page"
-        }
-    }
-]
+[{"pk": 8, "model": "admin.logentry", "fields": {"action_flag": 2, "action_time": "2008-02-19 14:04:42", "object_repr": "Secret Project", "object_id": "2", "change_message": "Changed project owner.", "user": 2, "content_type": 15}}, {"pk": 7, "model": "admin.logentry", "fields": {"action_flag": 2, "action_time": "2008-02-19 14:04:04", "object_repr": "Secret Project", "object_id": "2", "change_message": "Changed description long.", "user": 2, "content_type": 15}}, {"pk": 6, "model": "admin.logentry", "fields": {"action_flag": 1, "action_time": "2008-02-19 14:02:18", "object_repr": "Permissions for charles in Secret Project", "object_id": "3", "change_message": "", "user": 2, "content_type": 17}}, {"pk": 5, "model": "admin.logentry", "fields": {"action_flag": 3, "action_time": "2008-02-19 13:27:04", "object_repr": "test_admin2", "object_id": "3", "change_message": "", "user": 2, "content_type": 4}}, {"pk": 4, "model": "admin.logentry", "fields": {"action_flag": 2, "action_time": "2008-02-19 13:21:04", "object_repr": "Default permission set for project Secret Project", "object_id": "2", "change_message": "Changed view project, view repos, view issues and view wiki.", "user": 2, "content_type": 17}}, {"pk": 3, "model": "admin.logentry", "fields": {"action_flag": 1, "action_time": "2008-02-19 13:20:30", "object_repr": "Secret Project", "object_id": "2", "change_message": "", "user": 2, "content_type": 15}}, {"pk": 2, "model": "admin.logentry", "fields": {"action_flag": 1, "action_time": "2008-02-05 23:43:46", "object_repr": "The Manhattan Project", "object_id": "1", "change_message": "", "user": 1, "content_type": 15}}, {"pk": 1, "model": "admin.logentry", "fields": {"action_flag": 2, "action_time": "2008-02-05 23:35:53", "object_repr": "test_admin", "object_id": "2", "change_message": "Changed staff status, active and superuser status.", "user": 1, "content_type": 4}}, {"pk": 1, "model": "auth.user", "fields": {"username": "alisic", "first_name": "", "last_name": "", "is_active": true, "is_superuser": true, "is_staff": true, "last_login": "2008-02-07 14:46:11", "groups": [], "user_permissions": [], "password": "sha1$5930f$7fbcbdef9aaedc15d4a85e65fd92c83de702427c", "email": "sav@asv.as", "date_joined": "2008-02-05 22:56:50"}}, {"pk": 3, "model": "auth.user", "fields": {"username": "charles", "first_name": "", "last_name": "", "is_active": true, "is_superuser": false, "is_staff": false, "last_login": "2008-02-19 13:27:13", "groups": [], "user_permissions": [], "password": "sha1$69102$af413552fd2545c423bb5f41dd0056c08c6102ba", "email": "", "date_joined": "2008-02-19 13:27:13"}}, {"pk": 4, "model": "auth.user", "fields": {"username": "johnny", "first_name": "", "last_name": "", "is_active": true, "is_superuser": false, "is_staff": false, "last_login": "2008-02-19 14:04:21", "groups": [], "user_permissions": [], "password": "sha1$8ffa6$60fe5889a521d9831becfb66842a420e46b1d927", "email": "", "date_joined": "2008-02-19 14:04:21"}}, {"pk": 2, "model": "auth.user", "fields": {"username": "test_admin", "first_name": "", "last_name": "", "is_active": true, "is_superuser": true, "is_staff": true, "last_login": "2008-02-19 13:19:21", "groups": [], "user_permissions": [], "password": "sha1$3bdad$b068868ecce02f5db7ee7f2907566ca0f918aab9", "email": "", "date_joined": "2008-02-05 23:35:31"}}, {"pk": 1, "model": "auth.permission", "fields": {"codename": "add_logentry", "name": "Can add log entry", "content_type": 1}}, {"pk": 2, "model": "auth.permission", "fields": {"codename": "change_logentry", "name": "Can change log entry", "content_type": 1}}, {"pk": 3, "model": "auth.permission", "fields": {"codename": "delete_logentry", "name": "Can delete log entry", "content_type": 1}}, {"pk": 4, "model": "auth.permission", "fields": {"codename": "add_message", "name": "Can add message", "content_type": 2}}, {"pk": 5, "model": "auth.permission", "fields": {"codename": "change_message", "name": "Can change message", "content_type": 2}}, {"pk": 6, "model": "auth.permission", "fields": {"codename": "delete_message", "name": "Can delete message", "content_type": 2}}, {"pk": 7, "model": "auth.permission", "fields": {"codename": "add_group", "name": "Can add group", "content_type": 3}}, {"pk": 8, "model": "auth.permission", "fields": {"codename": "change_group", "name": "Can change group", "content_type": 3}}, {"pk": 9, "model": "auth.permission", "fields": {"codename": "delete_group", "name": "Can delete group", "content_type": 3}}, {"pk": 10, "model": "auth.permission", "fields": {"codename": "add_user", "name": "Can add user", "content_type": 4}}, {"pk": 11, "model": "auth.permission", "fields": {"codename": "change_user", "name": "Can change user", "content_type": 4}}, {"pk": 12, "model": "auth.permission", "fields": {"codename": "delete_user", "name": "Can delete user", "content_type": 4}}, {"pk": 13, "model": "auth.permission", "fields": {"codename": "add_permission", "name": "Can add permission", "content_type": 5}}, {"pk": 14, "model": "auth.permission", "fields": {"codename": "change_permission", "name": "Can change permission", "content_type": 5}}, {"pk": 15, "model": "auth.permission", "fields": {"codename": "delete_permission", "name": "Can delete permission", "content_type": 5}}, {"pk": 16, "model": "auth.permission", "fields": {"codename": "add_contenttype", "name": "Can add content type", "content_type": 6}}, {"pk": 17, "model": "auth.permission", "fields": {"codename": "change_contenttype", "name": "Can change content type", "content_type": 6}}, {"pk": 18, "model": "auth.permission", "fields": {"codename": "delete_contenttype", "name": "Can delete content type", "content_type": 6}}, {"pk": 19, "model": "auth.permission", "fields": {"codename": "add_session", "name": "Can add session", "content_type": 7}}, {"pk": 20, "model": "auth.permission", "fields": {"codename": "change_session", "name": "Can change session", "content_type": 7}}, {"pk": 21, "model": "auth.permission", "fields": {"codename": "delete_session", "name": "Can delete session", "content_type": 7}}, {"pk": 22, "model": "auth.permission", "fields": {"codename": "add_site", "name": "Can add site", "content_type": 8}}, {"pk": 23, "model": "auth.permission", "fields": {"codename": "change_site", "name": "Can change site", "content_type": 8}}, {"pk": 24, "model": "auth.permission", "fields": {"codename": "delete_site", "name": "Can delete site", "content_type": 8}}, {"pk": 25, "model": "auth.permission", "fields": {"codename": "add_setting", "name": "Can add setting", "content_type": 9}}, {"pk": 26, "model": "auth.permission", "fields": {"codename": "change_setting", "name": "Can change setting", "content_type": 9}}, {"pk": 27, "model": "auth.permission", "fields": {"codename": "delete_setting", "name": "Can delete setting", "content_type": 9}}, {"pk": 28, "model": "auth.permission", "fields": {"codename": "add_projectbackup", "name": "Can add project backup", "content_type": 10}}, {"pk": 29, "model": "auth.permission", "fields": {"codename": "change_projectbackup", "name": "Can change project backup", "content_type": 10}}, {"pk": 30, "model": "auth.permission", "fields": {"codename": "delete_projectbackup", "name": "Can delete project backup", "content_type": 10}}, {"pk": 31, "model": "auth.permission", "fields": {"codename": "add_issuetype", "name": "Can add issue type", "content_type": 11}}, {"pk": 32, "model": "auth.permission", "fields": {"codename": "change_issuetype", "name": "Can change issue type", "content_type": 11}}, {"pk": 33, "model": "auth.permission", "fields": {"codename": "delete_issuetype", "name": "Can delete issue type", "content_type": 11}}, {"pk": 34, "model": "auth.permission", "fields": {"codename": "add_issueseverity", "name": "Can add issue severity", "content_type": 12}}, {"pk": 35, "model": "auth.permission", "fields": {"codename": "change_issueseverity", "name": "Can change issue severity", "content_type": 12}}, {"pk": 36, "model": "auth.permission", "fields": {"codename": "delete_issueseverity", "name": "Can delete issue severity", "content_type": 12}}, {"pk": 37, "model": "auth.permission", "fields": {"codename": "add_issue", "name": "Can add issue", "content_type": 13}}, {"pk": 40, "model": "auth.permission", "fields": {"codename": "can_edit_issue_settings", "name": "Can edit issue settings", "content_type": 13}}, {"pk": 38, "model": "auth.permission", "fields": {"codename": "change_issue", "name": "Can change issue", "content_type": 13}}, {"pk": 39, "model": "auth.permission", "fields": {"codename": "delete_issue", "name": "Can delete issue", "content_type": 13}}, {"pk": 41, "model": "auth.permission", "fields": {"codename": "add_issuestatus", "name": "Can add issue status", "content_type": 14}}, {"pk": 42, "model": "auth.permission", "fields": {"codename": "change_issuestatus", "name": "Can change issue status", "content_type": 14}}, {"pk": 43, "model": "auth.permission", "fields": {"codename": "delete_issuestatus", "name": "Can delete issue status", "content_type": 14}}, {"pk": 44, "model": "auth.permission", "fields": {"codename": "add_project", "name": "Can add project", "content_type": 15}}, {"pk": 47, "model": "auth.permission", "fields": {"codename": "can_edit_project_settings", "name": "Can edit project settings", "content_type": 15}}, {"pk": 45, "model": "auth.permission", "fields": {"codename": "change_project", "name": "Can change project", "content_type": 15}}, {"pk": 46, "model": "auth.permission", "fields": {"codename": "delete_project", "name": "Can delete project", "content_type": 15}}, {"pk": 48, "model": "auth.permission", "fields": {"codename": "add_projectnews", "name": "Can add project news item", "content_type": 16}}, {"pk": 49, "model": "auth.permission", "fields": {"codename": "change_projectnews", "name": "Can change project news item", "content_type": 16}}, {"pk": 50, "model": "auth.permission", "fields": {"codename": "delete_projectnews", "name": "Can delete project news item", "content_type": 16}}, {"pk": 51, "model": "auth.permission", "fields": {"codename": "add_projectpermissionset", "name": "Can add project permission set", "content_type": 17}}, {"pk": 52, "model": "auth.permission", "fields": {"codename": "change_projectpermissionset", "name": "Can change project permission set", "content_type": 17}}, {"pk": 53, "model": "auth.permission", "fields": {"codename": "delete_projectpermissionset", "name": "Can delete project permission set", "content_type": 17}}, {"pk": 54, "model": "auth.permission", "fields": {"codename": "add_repo", "name": "Can add repo", "content_type": 18}}, {"pk": 55, "model": "auth.permission", "fields": {"codename": "change_repo", "name": "Can change repo", "content_type": 18}}, {"pk": 56, "model": "auth.permission", "fields": {"codename": "delete_repo", "name": "Can delete repo", "content_type": 18}}, {"pk": 57, "model": "auth.permission", "fields": {"codename": "add_page", "name": "Can add page", "content_type": 19}}, {"pk": 58, "model": "auth.permission", "fields": {"codename": "change_page", "name": "Can change page", "content_type": 19}}, {"pk": 59, "model": "auth.permission", "fields": {"codename": "delete_page", "name": "Can delete page", "content_type": 19}}, {"pk": 60, "model": "auth.permission", "fields": {"codename": "add_pagechange", "name": "Can add page change", "content_type": 20}}, {"pk": 61, "model": "auth.permission", "fields": {"codename": "change_pagechange", "name": "Can change page change", "content_type": 20}}, {"pk": 62, "model": "auth.permission", "fields": {"codename": "delete_pagechange", "name": "Can delete page change", "content_type": 20}}, {"pk": 63, "model": "auth.permission", "fields": {"codename": "add_registrationprofile", "name": "Can add registration profile", "content_type": 21}}, {"pk": 64, "model": "auth.permission", "fields": {"codename": "change_registrationprofile", "name": "Can change registration profile", "content_type": 21}}, {"pk": 65, "model": "auth.permission", "fields": {"codename": "delete_registrationprofile", "name": "Can delete registration profile", "content_type": 21}}, {"pk": 6, "model": "contenttypes.contenttype", "fields": {"model": "contenttype", "name": "content type", "app_label": "contenttypes"}}, {"pk": 3, "model": "contenttypes.contenttype", "fields": {"model": "group", "name": "group", "app_label": "auth"}}, {"pk": 13, "model": "contenttypes.contenttype", "fields": {"model": "issue", "name": "issue", "app_label": "issue"}}, {"pk": 12, "model": "contenttypes.contenttype", "fields": {"model": "issueseverity", "name": "issue severity", "app_label": "issue"}}, {"pk": 14, "model": "contenttypes.contenttype", "fields": {"model": "issuestatus", "name": "issue status", "app_label": "issue"}}, {"pk": 11, "model": "contenttypes.contenttype", "fields": {"model": "issuetype", "name": "issue type", "app_label": "issue"}}, {"pk": 1, "model": "contenttypes.contenttype", "fields": {"model": "logentry", "name": "log entry", "app_label": "admin"}}, {"pk": 2, "model": "contenttypes.contenttype", "fields": {"model": "message", "name": "message", "app_label": "auth"}}, {"pk": 19, "model": "contenttypes.contenttype", "fields": {"model": "page", "name": "page", "app_label": "wiki"}}, {"pk": 20, "model": "contenttypes.contenttype", "fields": {"model": "pagechange", "name": "page change", "app_label": "wiki"}}, {"pk": 5, "model": "contenttypes.contenttype", "fields": {"model": "permission", "name": "permission", "app_label": "auth"}}, {"pk": 15, "model": "contenttypes.contenttype", "fields": {"model": "project", "name": "project", "app_label": "project"}}, {"pk": 10, "model": "contenttypes.contenttype", "fields": {"model": "projectbackup", "name": "project backup", "app_label": "backup"}}, {"pk": 16, "model": "contenttypes.contenttype", "fields": {"model": "projectnews", "name": "project news item", "app_label": "project"}}, {"pk": 17, "model": "contenttypes.contenttype", "fields": {"model": "projectpermissionset", "name": "project permission set", "app_label": "project"}}, {"pk": 21, "model": "contenttypes.contenttype", "fields": {"model": "registrationprofile", "name": "registration profile", "app_label": "registration"}}, {"pk": 18, "model": "contenttypes.contenttype", "fields": {"model": "repo", "name": "repo", "app_label": "repo"}}, {"pk": 7, "model": "contenttypes.contenttype", "fields": {"model": "session", "name": "session", "app_label": "sessions"}}, {"pk": 9, "model": "contenttypes.contenttype", "fields": {"model": "setting", "name": "setting", "app_label": "config"}}, {"pk": 8, "model": "contenttypes.contenttype", "fields": {"model": "site", "name": "site", "app_label": "sites"}}, {"pk": 4, "model": "contenttypes.contenttype", "fields": {"model": "user", "name": "user", "app_label": "auth"}}, {"pk": "24505bce11c98e813acb4a4ddc8a5075", "model": "sessions.session", "fields": {"expire_date": "2008-02-19 23:33:17", "session_data": "gAJ9cQEoVRJfYXV0aF91c2VyX2JhY2tlbmRxAlUpZGphbmdvLmNvbnRyaWIuYXV0aC5iYWNrZW5k\ncy5Nb2RlbEJhY2tlbmRxA1UNX2F1dGhfdXNlcl9pZHEEigEBdS5hMzZmZjA0ZDkxN2MxYzYwYjI1\nYmJmNGYwNGFjODBjMQ==\n"}}, {"pk": "396a9fae5df13a736866b5c40ed9094a", "model": "sessions.session", "fields": {"expire_date": "2008-03-04 13:19:21", "session_data": "gAJ9cQEoVRJfYXV0aF91c2VyX2JhY2tlbmRxAlUpZGphbmdvLmNvbnRyaWIuYXV0aC5iYWNrZW5k\ncy5Nb2RlbEJhY2tlbmRxA1UNX2F1dGhfdXNlcl9pZHEESwJ1LjVkYjUwM2JhM2E0NDRhN2YwNWRk\nYWNiNjg5YTk2MTAz\n"}}, {"pk": 1, "model": "sites.site", "fields": {"domain": "example.com", "name": "example.com"}}, {"pk": 1, "model": "config.setting", "fields": {"class_name": "Issue", "module_name": "hgfront.issue.models", "attribute_name": "issues_per_page", "site": 1, "value": "20"}}, {"pk": 2, "model": "config.setting", "fields": {"class_name": "Project", "module_name": "hgfront.project.models", "attribute_name": "repository_directory", "site": 1, "value": "\/home\/alisic\/repos"}}, {"pk": 3, "model": "config.setting", "fields": {"class_name": "Project", "module_name": "hgfront.project.models", "attribute_name": "site_owner", "site": 1, "value": "the site own0r"}}, {"pk": 4, "model": "config.setting", "fields": {"class_name": "Project", "module_name": "hgfront.project.models", "attribute_name": "backups_directory", "site": 1, "value": "\/home\/alisic\/repos\/backups"}}, {"pk": 5, "model": "config.setting", "fields": {"class_name": "Project", "module_name": "hgfront.project.models", "attribute_name": "backups_max_days", "site": 1, "value": "0"}}, {"pk": 6, "model": "config.setting", "fields": {"class_name": "Issue", "module_name": "hgfront.issue.models", "attribute_name": "issue_from_email", "site": 1, "value": "bla@bla.com"}}, {"pk": 7, "model": "config.setting", "fields": {"class_name": "Project", "module_name": "hgfront.project.models", "attribute_name": "site_name", "site": 1, "value": "The site name"}}, {"pk": 1, "model": "issue.issuetype", "fields": {"order": 0, "is_active": true, "slug": "bug", "title": "Bug"}}, {"pk": 2, "model": "issue.issuetype", "fields": {"order": 1, "is_active": true, "slug": "enhancement", "title": "Enhancement"}}, {"pk": 3, "model": "issue.issuetype", "fields": {"order": 2, "is_active": true, "slug": "feature-request", "title": "Feature Request"}}, {"pk": 4, "model": "issue.issuetype", "fields": {"order": 3, "is_active": true, "slug": "typo", "title": "Typo"}}, {"pk": 1, "model": "issue.issueseverity", "fields": {"order": 0, "is_active": true, "slug": "minor", "title": "Minor"}}, {"pk": 2, "model": "issue.issueseverity", "fields": {"order": 1, "is_active": true, "slug": "medium", "title": "Medium"}}, {"pk": 3, "model": "issue.issueseverity", "fields": {"order": 2, "is_active": true, "slug": "major", "title": "Major"}}, {"pk": 4, "model": "issue.issueseverity", "fields": {"order": 3, "is_active": true, "slug": "critical", "title": "Critical"}}, {"pk": 5, "model": "issue.issueseverity", "fields": {"order": 4, "is_active": true, "slug": "blocker", "title": "Blocker"}}, {"pk": 1, "model": "issue.issuestatus", "fields": {"order": 0, "is_active": true, "slug": "raised", "title": "Raised"}}, {"pk": 2, "model": "issue.issuestatus", "fields": {"order": 1, "is_active": true, "slug": "accepted", "title": "Accepted"}}, {"pk": 3, "model": "issue.issuestatus", "fields": {"order": 2, "is_active": true, "slug": "not-accepted", "title": "Not Accepted"}}, {"pk": 4, "model": "issue.issuestatus", "fields": {"order": 3, "is_active": true, "slug": "fixed", "title": "Fixed"}}, {"pk": 5, "model": "issue.issuestatus", "fields": {"order": 4, "is_active": true, "slug": "works-for-me", "title": "Works For Me"}}, {"pk": 1, "model": "project.project", "fields": {"hgweb_style": "default", "pub_date": "2008-02-06 00:43:40", "name_short": "manhattan", "description_long": "no desc", "user_owner": 2, "description_short": "no desc", "name_long": "The Manhattan Project"}}, {"pk": 2, "model": "project.project", "fields": {"hgweb_style": "default", "pub_date": "2008-02-19 14:20:07", "name_short": "secret_project", "description_long": "No one can view this project or do anything with it except the user `charles`, who has all the permissions for it and `johnny`, who is the owner.", "user_owner": 4, "description_short": "a secret project", "name_long": "Secret Project"}}, {"pk": 1, "model": "project.projectpermissionset", "fields": {"edit_repos": false, "project": 1, "user_accepted": true, "delete_members": false, "delete_issues": false, "view_project": true, "view_repos": true, "edit_issues": false, "edit_project": false, "edit_wiki": false, "add_wiki": false, "is_default": true, "view_issues": true, "add_issues": false, "owner_accepted": true, "view_wiki": true, "delete_repos": false, "add_repos": false, "delete_wiki": false, "add_members": false, "user": null}}, {"pk": 2, "model": "project.projectpermissionset", "fields": {"edit_repos": false, "project": 2, "user_accepted": true, "delete_members": false, "delete_issues": false, "view_project": false, "view_repos": false, "edit_issues": false, "edit_project": false, "edit_wiki": false, "add_wiki": false, "is_default": true, "view_issues": false, "add_issues": false, "owner_accepted": true, "view_wiki": false, "delete_repos": false, "add_repos": false, "delete_wiki": false, "add_members": false, "user": null}}, {"pk": 3, "model": "project.projectpermissionset", "fields": {"edit_repos": true, "project": 2, "user_accepted": true, "delete_members": true, "delete_issues": true, "view_project": true, "view_repos": true, "edit_issues": true, "edit_project": true, "edit_wiki": true, "add_wiki": true, "is_default": false, "view_issues": true, "add_issues": true, "owner_accepted": true, "view_wiki": true, "delete_repos": true, "add_repos": true, "delete_wiki": true, "add_members": true, "user": 3}}, {"pk": 1, "model": "wiki.page", "fields": {"content": "This is the main wiki page for this project, write something here!", "parent_project": 1, "name": "Main_Page"}}, {"pk": 2, "model": "wiki.page", "fields": {"content": "This is the main wiki page for this project, write something here!", "parent_project": 2, "name": "Main_Page"}}]

File hgfront/project/tests.py

View file
  • Ignore whitespace
     set to True, it will perform the tests as an anonymous user"""
     anonymous = False
     fixtures = ['data.json']
-    username = 'test_admin'
-    password = 'test_admin'
+    user = 'test_admin'
+    passwords = {
+        'test_admin':'test_admin',
+        'charles':'charles',
+        'johnny':'johnny',
+    }
     def setUp(self):
         """
         The set up here makes the test use the repository and backup directory specified
         repo_backup_setting.value = my_backup_dir
         repo_dir_setting.save()
         repo_backup_setting.save()
+
         if not self.anonymous:
-            self.client.login(username=self.username, password=self.password)
+            self.client.login(username=self.user, password=self.passwords[self.user])
 
 class ProjectTestCase(HGFTestCase):
     """ A test case for testing project related stuff """
     def test_project_list_view(self):
+        """ Tests the project list view """
+        expected = {
+            'status_code':200,
+            'template_used':'project/project_list.html',
+        }
         response = self.client.get(reverse('project-list'))
-
-        self.assert_(response.status_code, 200)
-        self.assertTemplateUsed(response, 'project/project_list.html')
+        self.assert_(response.status_code == expected['status_code'])
+        self.assertTemplateUsed(response, expected['template_used'])
     
     def test_project_detail_view(self):
-        project = Project.objects.get(name_short='manhattan')
-        response = self.client.get(project.get_absolute_url())
-
-        self.assert_(response.status_code, 200)
-        self.assertTemplateUsed(response, 'project/project_detail.html')
+        expected = {
+            'project':Project.objects.get(name_short='manhattan'),
+            'status_code':200,
+            'template_used':'project/project_detail.html'
+        }
+        response = self.client.get(expected['project'].get_absolute_url())
+        self.assert_(response.status_code == expected['status_code'])
+        self.assertTemplateUsed(response, expected['template_used'])
         #using context[0] here because for some strange reason, the test
         #gets a list of 6 identical contexts. TODO: find out wtf
-        self.assertEquals(response.context[0]['project'], project)
+        self.assertEquals(response.context[0]['project'], expected['project'])
 
 class AnonymousProjectTestCase(ProjectTestCase):
-    """ This is like the ProjectTestCase test case only it does the testing
+    """ This is like the ProjectTestCase test case only it does the testingd
     with an anonymous user, whereas ProjectTestCase does the tests with a 
     logged in user"""
     anonymous = True
+
+class SecretProjectTestCase(HGFTestCase):
+    """ This tests stuff against the project that has minimal permissions enabled """
+    project_used = Project.objects.get(name_short='secret_project')
+
+    def test_unauthorized_403(self):
+        """ An unauthorized but logged in user should get a 403 error """
+        expected = {
+            'status_code':403,
+            'template_used':'403.html',
+        }
+        response = self.client.get(self.project_used.get_absolute_url())
+        self.assert_(response.status_code == expected['status_code'])
+        self.assertTemplateUsed(response, expected['template_used'])
+
+    def test_anonymouse_403(self):
+        """ An anonymous user should get a 403 error """
+        expected = {
+            'status_code':403,
+            'template_used':'403.html',
+        }
+        self.client.logout()
+        response = self.client.get(self.project_used.get_absolute_url())
+        self.client.login(username=self.user, password=self.passwords[self.user])
+        self.assert_(response.status_code == expected['status_code'])
+        self.assertTemplateUsed(response, expected['template_used'])
+    
+    def test_authorized_200(self):
+        """ An authorized user should get a 200 response code """
+        expected = {'status_code':200,}
+        authorized_username = 'charles'
+        self.client.login(username=authorized_username, password=self.passwords[authorized_username])
+        response = self.client.get(self.project_used.get_absolute_url())
+        self.assert_(response.status_code == expected['status_code'])
+        self.client.login(username=self.user, password=self.passwords[self.user])
+    
+    def test_admin_200(self):
+        """ The admin should be able to view the project and get a 200 response code """
+        expected = {'status_code':200,}
+        authorized_username = 'johnny'
+        self.client.login(username=authorized_username, password=self.passwords[authorized_username])
+        response = self.client.get(self.project_used.get_absolute_url())
+        self.assert_(response.status_code == expected['status_code'])
+        self.client.login(username=self.user, password=self.passwords[self.user])