{"action":"created","comment":{"url":"https://api.github.com/repos/kensho/pyorient/pulls/comments/50130904","id":50130904,"diff_hunk":"@@ -613,3 +623,36 @@ def testRegistryLoading(self):\n         manufactures_cls = g.registry['manufactures']\n         assert type(manufactures_cls.in_) == Link\n         assert manufactures_cls.in_.linked_to == g.registry['cpu']\n+\n+\n+class OGMTestInheritance(unittest.TestCase):\n+    def __init__(self, *args, **kwargs):\n+        super(OGMTestInheritance, self).__init__(*args, **kwargs)\n+        self.g = None\n+\n+    def setUp(self):\n+        g = self.g = Graph(Config.from_url('hardware', 'root', 'root'\n+                                           , initial_drop=True))\n+\n+        g.create_all(HardwareNode.registry)\n+        g.create_all(HardwareRelationship.registry)\n+\n+    def testInheritance(self):\n+        g = self.g\n+        pentium = g.x86cpu.create(name='Pentium', version=6)\n+        loaded_pentium = g.get_vertex(pentium._id)\n+        assert loaded_pentium == pentium\n+\n+    def testStrictness(self):\n+        g = self.g\n+\n+        # Unknown properties get silently dropped by default\n+        pentium = g.cpu.create(name='Pentium', version=6)\n+        loaded_pentium = g.get_vertex(pentium._id)\n+        assert not hasattr(pentium, 'version')","path":"tests/test_ogm.py","position":80,"original_position":80,"commit_id":"cf32940ee2438f9c9a73d48dbe45c51c7516e3df","original_commit_id":"cf32940ee2438f9c9a73d48dbe45c51c7516e3df","user":{"login":"obi1kenobi","id":2348618,"avatar_url":"https://avatars.githubusercontent.com/u/2348618?v=3","gravatar_id":"","url":"https://api.github.com/users/obi1kenobi","html_url":"https://github.com/obi1kenobi","followers_url":"https://api.github.com/users/obi1kenobi/followers","following_url":"https://api.github.com/users/obi1kenobi/following{/other_user}","gists_url":"https://api.github.com/users/obi1kenobi/gists{/gist_id}","starred_url":"https://api.github.com/users/obi1kenobi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/obi1kenobi/subscriptions","organizations_url":"https://api.github.com/users/obi1kenobi/orgs","repos_url":"https://api.github.com/users/obi1kenobi/repos","events_url":"https://api.github.com/users/obi1kenobi/events{/privacy}","received_events_url":"https://api.github.com/users/obi1kenobi/received_events","type":"User","site_admin":false},"body":"can you also assert that the `name` property is set correctly?","created_at":"2016-01-19T16:01:23Z","updated_at":"2016-01-19T16:01:23Z","html_url":"https://github.com/kensho/pyorient/pull/7#discussion_r50130904","pull_request_url":"https://api.github.com/repos/kensho/pyorient/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/kensho/pyorient/pulls/comments/50130904"},"html":{"href":"https://github.com/kensho/pyorient/pull/7#discussion_r50130904"},"pull_request":{"href":"https://api.github.com/repos/kensho/pyorient/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/kensho/pyorient/pulls/7","id":56284751,"html_url":"https://github.com/kensho/pyorient/pull/7","diff_url":"https://github.com/kensho/pyorient/pull/7.diff","patch_url":"https://github.com/kensho/pyorient/pull/7.patch","issue_url":"https://api.github.com/repos/kensho/pyorient/issues/7","number":7,"state":"open","locked":false,"title":"Process hierarchy","user":{"login":"lodrion","id":7409275,"avatar_url":"https://avatars.githubusercontent.com/u/7409275?v=3","gravatar_id":"","url":"https://api.github.com/users/lodrion","html_url":"https://github.com/lodrion","followers_url":"https://api.github.com/users/lodrion/followers","following_url":"https://api.github.com/users/lodrion/following{/other_user}","gists_url":"https://api.github.com/users/lodrion/gists{/gist_id}","starred_url":"https://api.github.com/users/lodrion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lodrion/subscriptions","organizations_url":"https://api.github.com/users/lodrion/orgs","repos_url":"https://api.github.com/users/lodrion/repos","events_url":"https://api.github.com/users/lodrion/events{/privacy}","received_events_url":"https://api.github.com/users/lodrion/received_events","type":"User","site_admin":false},"body":"Correctly handle inherited properties. Also a semi-hacky way of inheriting properties from non-graph objects.\r\n\r\nAdded strictness parameter for blowing when unknown properties are set on the OGM objects","created_at":"2016-01-17T19:12:50Z","updated_at":"2016-01-19T16:01:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7e9b4c4220f2519ece16d9bebc3be750d27566d7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/kensho/pyorient/pulls/7/commits","review_comments_url":"https://api.github.com/repos/kensho/pyorient/pulls/7/comments","review_comment_url":"https://api.github.com/repos/kensho/pyorient/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kensho/pyorient/issues/7/comments","statuses_url":"https://api.github.com/repos/kensho/pyorient/statuses/cf32940ee2438f9c9a73d48dbe45c51c7516e3df","head":{"label":"kensho:process_hierarchy","ref":"process_hierarchy","sha":"cf32940ee2438f9c9a73d48dbe45c51c7516e3df","user":{"login":"kensho","id":8397632,"avatar_url":"https://avatars.githubusercontent.com/u/8397632?v=3","gravatar_id":"","url":"https://api.github.com/users/kensho","html_url":"https://github.com/kensho","followers_url":"https://api.github.com/users/kensho/followers","following_url":"https://api.github.com/users/kensho/following{/other_user}","gists_url":"https://api.github.com/users/kensho/gists{/gist_id}","starred_url":"https://api.github.com/users/kensho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kensho/subscriptions","organizations_url":"https://api.github.com/users/kensho/orgs","repos_url":"https://api.github.com/users/kensho/repos","events_url":"https://api.github.com/users/kensho/events{/privacy}","received_events_url":"https://api.github.com/users/kensho/received_events","type":"Organization","site_admin":false},"repo":{"id":45851787,"name":"pyorient","full_name":"kensho/pyorient","owner":{"login":"kensho","id":8397632,"avatar_url":"https://avatars.githubusercontent.com/u/8397632?v=3","gravatar_id":"","url":"https://api.github.com/users/kensho","html_url":"https://github.com/kensho","followers_url":"https://api.github.com/users/kensho/followers","following_url":"https://api.github.com/users/kensho/following{/other_user}","gists_url":"https://api.github.com/users/kensho/gists{/gist_id}","starred_url":"https://api.github.com/users/kensho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kensho/subscriptions","organizations_url":"https://api.github.com/users/kensho/orgs","repos_url":"https://api.github.com/users/kensho/repos","events_url":"https://api.github.com/users/kensho/events{/privacy}","received_events_url":"https://api.github.com/users/kensho/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kensho/pyorient","description":"Orientdb driver for python that uses the binary protocol.","fork":true,"url":"https://api.github.com/repos/kensho/pyorient","forks_url":"https://api.github.com/repos/kensho/pyorient/forks","keys_url":"https://api.github.com/repos/kensho/pyorient/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kensho/pyorient/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kensho/pyorient/teams","hooks_url":"https://api.github.com/repos/kensho/pyorient/hooks","issue_events_url":"https://api.github.com/repos/kensho/pyorient/issues/events{/number}","events_url":"https://api.github.com/repos/kensho/pyorient/events","assignees_url":"https://api.github.com/repos/kensho/pyorient/assignees{/user}","branches_url":"https://api.github.com/repos/kensho/pyorient/branches{/branch}","tags_url":"https://api.github.com/repos/kensho/pyorient/tags","blobs_url":"https://api.github.com/repos/kensho/pyorient/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kensho/pyorient/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kensho/pyorient/git/refs{/sha}","trees_url":"https://api.github.com/repos/kensho/pyorient/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kensho/pyorient/statuses/{sha}","languages_url":"https://api.github.com/repos/kensho/pyorient/languages","stargazers_url":"https://api.github.com/repos/kensho/pyorient/stargazers","contributors_url":"https://api.github.com/repos/kensho/pyorient/contributors","subscribers_url":"https://api.github.com/repos/kensho/pyorient/subscribers","subscription_url":"https://api.github.com/repos/kensho/pyorient/subscription","commits_url":"https://api.github.com/repos/kensho/pyorient/commits{/sha}","git_commits_url":"https://api.github.com/repos/kensho/pyorient/git/commits{/sha}","comments_url":"https://api.github.com/repos/kensho/pyorient/comments{/number}","issue_comment_url":"https://api.github.com/repos/kensho/pyorient/issues/comments{/number}","contents_url":"https://api.github.com/repos/kensho/pyorient/contents/{+path}","compare_url":"https://api.github.com/repos/kensho/pyorient/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kensho/pyorient/merges","archive_url":"https://api.github.com/repos/kensho/pyorient/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kensho/pyorient/downloads","issues_url":"https://api.github.com/repos/kensho/pyorient/issues{/number}","pulls_url":"https://api.github.com/repos/kensho/pyorient/pulls{/number}","milestones_url":"https://api.github.com/repos/kensho/pyorient/milestones{/number}","notifications_url":"https://api.github.com/repos/kensho/pyorient/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kensho/pyorient/labels{/name}","releases_url":"https://api.github.com/repos/kensho/pyorient/releases{/id}","created_at":"2015-11-09T16:43:04Z","updated_at":"2016-01-12T22:31:23Z","pushed_at":"2016-01-17T19:12:50Z","git_url":"git://github.com/kensho/pyorient.git","ssh_url":"git@github.com:kensho/pyorient.git","clone_url":"https://github.com/kensho/pyorient.git","svn_url":"https://github.com/kensho/pyorient","homepage":"","size":4852,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"kensho:pip_target","ref":"pip_target","sha":"d108dbe624059aae1e6f0ce46390aa142c166e8b","user":{"login":"kensho","id":8397632,"avatar_url":"https://avatars.githubusercontent.com/u/8397632?v=3","gravatar_id":"","url":"https://api.github.com/users/kensho","html_url":"https://github.com/kensho","followers_url":"https://api.github.com/users/kensho/followers","following_url":"https://api.github.com/users/kensho/following{/other_user}","gists_url":"https://api.github.com/users/kensho/gists{/gist_id}","starred_url":"https://api.github.com/users/kensho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kensho/subscriptions","organizations_url":"https://api.github.com/users/kensho/orgs","repos_url":"https://api.github.com/users/kensho/repos","events_url":"https://api.github.com/users/kensho/events{/privacy}","received_events_url":"https://api.github.com/users/kensho/received_events","type":"Organization","site_admin":false},"repo":{"id":45851787,"name":"pyorient","full_name":"kensho/pyorient","owner":{"login":"kensho","id":8397632,"avatar_url":"https://avatars.githubusercontent.com/u/8397632?v=3","gravatar_id":"","url":"https://api.github.com/users/kensho","html_url":"https://github.com/kensho","followers_url":"https://api.github.com/users/kensho/followers","following_url":"https://api.github.com/users/kensho/following{/other_user}","gists_url":"https://api.github.com/users/kensho/gists{/gist_id}","starred_url":"https://api.github.com/users/kensho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kensho/subscriptions","organizations_url":"https://api.github.com/users/kensho/orgs","repos_url":"https://api.github.com/users/kensho/repos","events_url":"https://api.github.com/users/kensho/events{/privacy}","received_events_url":"https://api.github.com/users/kensho/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kensho/pyorient","description":"Orientdb driver for python that uses the binary protocol.","fork":true,"url":"https://api.github.com/repos/kensho/pyorient","forks_url":"https://api.github.com/repos/kensho/pyorient/forks","keys_url":"https://api.github.com/repos/kensho/pyorient/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kensho/pyorient/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kensho/pyorient/teams","hooks_url":"https://api.github.com/repos/kensho/pyorient/hooks","issue_events_url":"https://api.github.com/repos/kensho/pyorient/issues/events{/number}","events_url":"https://api.github.com/repos/kensho/pyorient/events","assignees_url":"https://api.github.com/repos/kensho/pyorient/assignees{/user}","branches_url":"https://api.github.com/repos/kensho/pyorient/branches{/branch}","tags_url":"https://api.github.com/repos/kensho/pyorient/tags","blobs_url":"https://api.github.com/repos/kensho/pyorient/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kensho/pyorient/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kensho/pyorient/git/refs{/sha}","trees_url":"https://api.github.com/repos/kensho/pyorient/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kensho/pyorient/statuses/{sha}","languages_url":"https://api.github.com/repos/kensho/pyorient/languages","stargazers_url":"https://api.github.com/repos/kensho/pyorient/stargazers","contributors_url":"https://api.github.com/repos/kensho/pyorient/contributors","subscribers_url":"https://api.github.com/repos/kensho/pyorient/subscribers","subscription_url":"https://api.github.com/repos/kensho/pyorient/subscription","commits_url":"https://api.github.com/repos/kensho/pyorient/commits{/sha}","git_commits_url":"https://api.github.com/repos/kensho/pyorient/git/commits{/sha}","comments_url":"https://api.github.com/repos/kensho/pyorient/comments{/number}","issue_comment_url":"https://api.github.com/repos/kensho/pyorient/issues/comments{/number}","contents_url":"https://api.github.com/repos/kensho/pyorient/contents/{+path}","compare_url":"https://api.github.com/repos/kensho/pyorient/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kensho/pyorient/merges","archive_url":"https://api.github.com/repos/kensho/pyorient/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kensho/pyorient/downloads","issues_url":"https://api.github.com/repos/kensho/pyorient/issues{/number}","pulls_url":"https://api.github.com/repos/kensho/pyorient/pulls{/number}","milestones_url":"https://api.github.com/repos/kensho/pyorient/milestones{/number}","notifications_url":"https://api.github.com/repos/kensho/pyorient/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kensho/pyorient/labels{/name}","releases_url":"https://api.github.com/repos/kensho/pyorient/releases{/id}","created_at":"2015-11-09T16:43:04Z","updated_at":"2016-01-12T22:31:23Z","pushed_at":"2016-01-17T19:12:50Z","git_url":"git://github.com/kensho/pyorient.git","ssh_url":"git@github.com:kensho/pyorient.git","clone_url":"https://github.com/kensho/pyorient.git","svn_url":"https://github.com/kensho/pyorient","homepage":"","size":4852,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kensho/pyorient/pulls/7"},"html":{"href":"https://github.com/kensho/pyorient/pull/7"},"issue":{"href":"https://api.github.com/repos/kensho/pyorient/issues/7"},"comments":{"href":"https://api.github.com/repos/kensho/pyorient/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/kensho/pyorient/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/kensho/pyorient/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kensho/pyorient/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/kensho/pyorient/statuses/cf32940ee2438f9c9a73d48dbe45c51c7516e3df"}}}}