{"action":"created","comment":{"url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/pulls/comments/31871444","id":31871444,"diff_hunk":"@@ -0,0 +1,274 @@\n+from xml.etree import ElementTree\n+from django.test import TestCase\n+from django.contrib.auth.models import User\n+from nose.tools import raises, assert_equals, assert_not_equals, assert_true, assert_false\n+from api.models import Procedure, Page, Element\n+from api.generator import ProcedureGenerator, PageGenerator, ElementGenerator, ProtocolBuilder\n+import uuid\n+\n+\n+class ProcedureGeneratorTest(TestCase):\n+    def setUp(self):\n+        test_user = User.objects.create_user(\n+            'TestUser',\n+            'test@sanaprotocolbuilder.me',\n+            'testpassword'\n+        )\n+        test_user.save()\n+\n+        self.procedure = Procedure.objects.create(\n+            author='tester',\n+            title='test procedure',\n+            owner=test_user\n+        )\n+\n+        self.generator = ProcedureGenerator(self.procedure)\n+        self.procedureElement = self.generator.generate()","path":"src-backend/api/tests/test_generator.py","position":26,"original_position":26,"commit_id":"4cf56f1556d36ca4fbe0f61ea66efd63f7b30180","original_commit_id":"4cf56f1556d36ca4fbe0f61ea66efd63f7b30180","user":{"login":"Trinovantes","id":458691,"avatar_url":"https://avatars.githubusercontent.com/u/458691?v=3","gravatar_id":"","url":"https://api.github.com/users/Trinovantes","html_url":"https://github.com/Trinovantes","followers_url":"https://api.github.com/users/Trinovantes/followers","following_url":"https://api.github.com/users/Trinovantes/following{/other_user}","gists_url":"https://api.github.com/users/Trinovantes/gists{/gist_id}","starred_url":"https://api.github.com/users/Trinovantes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Trinovantes/subscriptions","organizations_url":"https://api.github.com/users/Trinovantes/orgs","repos_url":"https://api.github.com/users/Trinovantes/repos","events_url":"https://api.github.com/users/Trinovantes/events{/privacy}","received_events_url":"https://api.github.com/users/Trinovantes/received_events","type":"User","site_admin":false},"body":"snake case","created_at":"2015-06-06T20:52:34Z","updated_at":"2015-06-06T20:52:34Z","html_url":"https://github.com/SanaMobile/sana.protocol_builder/pull/120#discussion_r31871444","pull_request_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/pulls/120","_links":{"self":{"href":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/pulls/comments/31871444"},"html":{"href":"https://github.com/SanaMobile/sana.protocol_builder/pull/120#discussion_r31871444"},"pull_request":{"href":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/pulls/120"}}},"pull_request":{"url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/pulls/120","id":37083012,"html_url":"https://github.com/SanaMobile/sana.protocol_builder/pull/120","diff_url":"https://github.com/SanaMobile/sana.protocol_builder/pull/120.diff","patch_url":"https://github.com/SanaMobile/sana.protocol_builder/pull/120.patch","issue_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/issues/120","number":120,"state":"open","locked":false,"title":"Create the protocol generator","user":{"login":"Kapin","id":995382,"avatar_url":"https://avatars.githubusercontent.com/u/995382?v=3","gravatar_id":"","url":"https://api.github.com/users/Kapin","html_url":"https://github.com/Kapin","followers_url":"https://api.github.com/users/Kapin/followers","following_url":"https://api.github.com/users/Kapin/following{/other_user}","gists_url":"https://api.github.com/users/Kapin/gists{/gist_id}","starred_url":"https://api.github.com/users/Kapin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kapin/subscriptions","organizations_url":"https://api.github.com/users/Kapin/orgs","repos_url":"https://api.github.com/users/Kapin/repos","events_url":"https://api.github.com/users/Kapin/events{/privacy}","received_events_url":"https://api.github.com/users/Kapin/received_events","type":"User","site_admin":false},"body":"Generator that uses the database to create xml string output. Includes a lot of tests. I will create the routes, and other bits later.\r\n\r\nTests need a lot of future cleanup as there is a ridiculous amount of redundant code","created_at":"2015-06-06T02:09:32Z","updated_at":"2015-06-06T20:52:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1f89f54cf55a3058c38a97bb5a5e5b6ede9004c0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/pulls/120/commits","review_comments_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/pulls/120/comments","review_comment_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/issues/120/comments","statuses_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/statuses/4cf56f1556d36ca4fbe0f61ea66efd63f7b30180","head":{"label":"SanaMobile:josh/generator","ref":"josh/generator","sha":"4cf56f1556d36ca4fbe0f61ea66efd63f7b30180","user":{"login":"SanaMobile","id":6865473,"avatar_url":"https://avatars.githubusercontent.com/u/6865473?v=3","gravatar_id":"","url":"https://api.github.com/users/SanaMobile","html_url":"https://github.com/SanaMobile","followers_url":"https://api.github.com/users/SanaMobile/followers","following_url":"https://api.github.com/users/SanaMobile/following{/other_user}","gists_url":"https://api.github.com/users/SanaMobile/gists{/gist_id}","starred_url":"https://api.github.com/users/SanaMobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SanaMobile/subscriptions","organizations_url":"https://api.github.com/users/SanaMobile/orgs","repos_url":"https://api.github.com/users/SanaMobile/repos","events_url":"https://api.github.com/users/SanaMobile/events{/privacy}","received_events_url":"https://api.github.com/users/SanaMobile/received_events","type":"Organization","site_admin":false},"repo":{"id":25015456,"name":"sana.protocol_builder","full_name":"SanaMobile/sana.protocol_builder","owner":{"login":"SanaMobile","id":6865473,"avatar_url":"https://avatars.githubusercontent.com/u/6865473?v=3","gravatar_id":"","url":"https://api.github.com/users/SanaMobile","html_url":"https://github.com/SanaMobile","followers_url":"https://api.github.com/users/SanaMobile/followers","following_url":"https://api.github.com/users/SanaMobile/following{/other_user}","gists_url":"https://api.github.com/users/SanaMobile/gists{/gist_id}","starred_url":"https://api.github.com/users/SanaMobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SanaMobile/subscriptions","organizations_url":"https://api.github.com/users/SanaMobile/orgs","repos_url":"https://api.github.com/users/SanaMobile/repos","events_url":"https://api.github.com/users/SanaMobile/events{/privacy}","received_events_url":"https://api.github.com/users/SanaMobile/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SanaMobile/sana.protocol_builder","description":"Web app for building Sana Protocols","fork":false,"url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder","forks_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/forks","keys_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/teams","hooks_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/hooks","issue_events_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/issues/events{/number}","events_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/events","assignees_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/assignees{/user}","branches_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/branches{/branch}","tags_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/tags","blobs_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/git/refs{/sha}","trees_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/statuses/{sha}","languages_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/languages","stargazers_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/stargazers","contributors_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/contributors","subscribers_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/subscribers","subscription_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/subscription","commits_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/commits{/sha}","git_commits_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/git/commits{/sha}","comments_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/comments{/number}","issue_comment_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/issues/comments{/number}","contents_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/contents/{+path}","compare_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/merges","archive_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/downloads","issues_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/issues{/number}","pulls_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/pulls{/number}","milestones_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/milestones{/number}","notifications_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/labels{/name}","releases_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/releases{/id}","created_at":"2014-10-10T01:24:58Z","updated_at":"2015-06-05T22:41:10Z","pushed_at":"2015-06-06T20:36:42Z","git_url":"git://github.com/SanaMobile/sana.protocol_builder.git","ssh_url":"git@github.com:SanaMobile/sana.protocol_builder.git","clone_url":"https://github.com/SanaMobile/sana.protocol_builder.git","svn_url":"https://github.com/SanaMobile/sana.protocol_builder","homepage":"","size":6553,"stargazers_count":2,"watchers_count":2,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":26,"forks":0,"open_issues":26,"watchers":2,"default_branch":"master"}},"base":{"label":"SanaMobile:master","ref":"master","sha":"2c868ef0eeae271821fdc2b48fc34b70bbf19555","user":{"login":"SanaMobile","id":6865473,"avatar_url":"https://avatars.githubusercontent.com/u/6865473?v=3","gravatar_id":"","url":"https://api.github.com/users/SanaMobile","html_url":"https://github.com/SanaMobile","followers_url":"https://api.github.com/users/SanaMobile/followers","following_url":"https://api.github.com/users/SanaMobile/following{/other_user}","gists_url":"https://api.github.com/users/SanaMobile/gists{/gist_id}","starred_url":"https://api.github.com/users/SanaMobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SanaMobile/subscriptions","organizations_url":"https://api.github.com/users/SanaMobile/orgs","repos_url":"https://api.github.com/users/SanaMobile/repos","events_url":"https://api.github.com/users/SanaMobile/events{/privacy}","received_events_url":"https://api.github.com/users/SanaMobile/received_events","type":"Organization","site_admin":false},"repo":{"id":25015456,"name":"sana.protocol_builder","full_name":"SanaMobile/sana.protocol_builder","owner":{"login":"SanaMobile","id":6865473,"avatar_url":"https://avatars.githubusercontent.com/u/6865473?v=3","gravatar_id":"","url":"https://api.github.com/users/SanaMobile","html_url":"https://github.com/SanaMobile","followers_url":"https://api.github.com/users/SanaMobile/followers","following_url":"https://api.github.com/users/SanaMobile/following{/other_user}","gists_url":"https://api.github.com/users/SanaMobile/gists{/gist_id}","starred_url":"https://api.github.com/users/SanaMobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SanaMobile/subscriptions","organizations_url":"https://api.github.com/users/SanaMobile/orgs","repos_url":"https://api.github.com/users/SanaMobile/repos","events_url":"https://api.github.com/users/SanaMobile/events{/privacy}","received_events_url":"https://api.github.com/users/SanaMobile/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SanaMobile/sana.protocol_builder","description":"Web app for building Sana Protocols","fork":false,"url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder","forks_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/forks","keys_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/teams","hooks_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/hooks","issue_events_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/issues/events{/number}","events_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/events","assignees_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/assignees{/user}","branches_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/branches{/branch}","tags_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/tags","blobs_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/git/refs{/sha}","trees_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/statuses/{sha}","languages_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/languages","stargazers_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/stargazers","contributors_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/contributors","subscribers_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/subscribers","subscription_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/subscription","commits_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/commits{/sha}","git_commits_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/git/commits{/sha}","comments_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/comments{/number}","issue_comment_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/issues/comments{/number}","contents_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/contents/{+path}","compare_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/merges","archive_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/downloads","issues_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/issues{/number}","pulls_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/pulls{/number}","milestones_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/milestones{/number}","notifications_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/labels{/name}","releases_url":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/releases{/id}","created_at":"2014-10-10T01:24:58Z","updated_at":"2015-06-05T22:41:10Z","pushed_at":"2015-06-06T20:36:42Z","git_url":"git://github.com/SanaMobile/sana.protocol_builder.git","ssh_url":"git@github.com:SanaMobile/sana.protocol_builder.git","clone_url":"https://github.com/SanaMobile/sana.protocol_builder.git","svn_url":"https://github.com/SanaMobile/sana.protocol_builder","homepage":"","size":6553,"stargazers_count":2,"watchers_count":2,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":26,"forks":0,"open_issues":26,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/pulls/120"},"html":{"href":"https://github.com/SanaMobile/sana.protocol_builder/pull/120"},"issue":{"href":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/issues/120"},"comments":{"href":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/issues/120/comments"},"review_comments":{"href":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/pulls/120/comments"},"review_comment":{"href":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/pulls/120/commits"},"statuses":{"href":"https://api.github.com/repos/SanaMobile/sana.protocol_builder/statuses/4cf56f1556d36ca4fbe0f61ea66efd63f7b30180"}}}}