Commits

Miran Lipovača committed 184ea15

+ Improved tests

  • Participants
  • Parent commits e695061

Comments (0)

Files changed (2)

-[{"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": 1, "is_superuser": 1, "is_staff": 1, "last_login": "2008-02-05 23:33:17", "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": 1, "is_superuser": 1, "is_staff": 1, "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": 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": 1, "slug": "bug", "title": "Bug"}}, {"pk": 2, "model": "issue.issuetype", "fields": {"order": 1, "is_active": 1, "slug": "enhancement", "title": "Enhancement"}}, {"pk": 3, "model": "issue.issuetype", "fields": {"order": 2, "is_active": 1, "slug": "feature-request", "title": "Feature Request"}}, {"pk": 4, "model": "issue.issuetype", "fields": {"order": 3, "is_active": 1, "slug": "typo", "title": "Typo"}}, {"pk": 1, "model": "issue.issueseverity", "fields": {"order": 0, "is_active": 1, "slug": "minor", "title": "Minor"}}, {"pk": 2, "model": "issue.issueseverity", "fields": {"order": 1, "is_active": 1, "slug": "medium", "title": "Medium"}}, {"pk": 3, "model": "issue.issueseverity", "fields": {"order": 2, "is_active": 1, "slug": "major", "title": "Major"}}, {"pk": 4, "model": "issue.issueseverity", "fields": {"order": 3, "is_active": 1, "slug": "critical", "title": "Critical"}}, {"pk": 5, "model": "issue.issueseverity", "fields": {"order": 4, "is_active": 1, "slug": "blocker", "title": "Blocker"}}, {"pk": 1, "model": "issue.issuestatus", "fields": {"order": 0, "is_active": 1, "slug": "raised", "title": "Raised"}}, {"pk": 2, "model": "issue.issuestatus", "fields": {"order": 1, "is_active": 1, "slug": "accepted", "title": "Accepted"}}, {"pk": 3, "model": "issue.issuestatus", "fields": {"order": 2, "is_active": 1, "slug": "not-accepted", "title": "Not Accepted"}}, {"pk": 4, "model": "issue.issuestatus", "fields": {"order": 3, "is_active": 1, "slug": "fixed", "title": "Fixed"}}, {"pk": 5, "model": "issue.issuestatus", "fields": {"order": 4, "is_active": 1, "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": 0, "project": 1, "user_accepted": 1, "delete_members": 0, "delete_issues": 0, "view_project": 1, "view_repos": 1, "edit_issues": 0, "edit_project": 0, "edit_wiki": 0, "add_wiki": 0, "is_default": 1, "view_issues": 1, "add_issues": 0, "owner_accepted": 1, "view_wiki": 1, "delete_repos": 0, "add_repos": 0, "delete_wiki": 0, "add_members": 0, "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": 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"
+        }
+    }
+]

hgfront/project/tests.py

 from django.test import TestCase
 from django.core.urlresolvers import reverse
 from models import Project, ProjectPermissionSet
+from hgfront.config.models import Setting
 from django.contrib.auth.models import User
 
+# Put your repo and backups path here before testing until
+# I find a way to get the settings from the normal database
+# instead of the temporary test database that's created when
+# tests are run
+my_repo_dir = '/home/alisic/repos/'
+my_backup_dir = my_repo_dir + 'backups/'
 class ProjectTestCase(TestCase):
+    """ A test case for testing project related stuff """
+
     fixtures = ['data.json']
 
     def setUp(self):
-        pass
+        self.client.login(username='test_admin', password='test_admin')
+        repo_dir_setting = Setting.objects.get(attribute_name=u'repository_directory')
+        repo_backup_setting = Setting.objects.get(attribute_name=u'backups_directory')
+        repo_dir_setting.value = my_repo_dir
+        repo_backup_setting.value = my_backup_dir
+        repo_dir_setting.save()
+        repo_backup_setting.save()
 
     def test_project_list_view(self):
         response = self.client.get(reverse('project-list'))
+
         self.assert_(response.status_code, 200)
+        self.assertTemplateUsed(response, 'project/project_list.html')
     
     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')
+        #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)
+
+class AnonymousProjectTestCase(ProjectTestCase):
+    """ This is like the ProjectTestCase test case only it does the testing
+    with an anonymous user, whereas ProjectTestCase does the tests with a 
+    logged in user"""
+
+    def setUp(self):
+        super(self.__class__, self).setUp()
+        self.client.logout()