{"action":"created","comment":{"url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/pulls/comments/23500779","id":23500779,"diff_hunk":"@@ -2,27 +2,90 @@\n # -*- coding: utf-8 -*-\n \n \"\"\"\n-test_apt-cacher-ng-formula\n+test_apt-cacher-ng_formula\n ----------------------------------\n \n-Tests for `apt-cacher-ng-formula` module.\n+Tests for `apt_cacher_ng_formula` module.\n \"\"\"\n \n import unittest\n+import salt.utils.templates\n+import salt.template\n+import salt.loader\n+import salt.renderers.jinja\n+import pprint\n+import logging\n+import sys\n+logging.basicConfig(\n+    stream=sys.stderr,\n+    level=logging.DEBUG\n+)\n \n-from apt-cacher-ng-formula import apt-cacher-ng-formula\n+import salt.renderers.jinja\n+import salt.transport\n+import pprint\n+from mock import MagicMock\n+import mock\n \n \n-class TestApt-cacher-ng-formula(unittest.TestCase):\n+\n+\n+class TestAptCacherNgFormula(unittest.TestCase):\n \n     def setUp(self):\n-        pass\n \n-    def test_something(self):\n-        pass\n+        salt.renderers.jinja.__salt__= MagicMock()\n+        salt.renderers.jinja.__grains__= MagicMock()\n+        salt.renderers.jinja.__opts__= {\n+            'cachedir' : \"/tmp/cachedir\",","path":"tests/test_apt-cacher-ng-formula.py","position":46,"original_position":46,"commit_id":"94f03ad5edb339176e7076b2a61d2e9417e8e0a3","original_commit_id":"7419c7c959035f2c25815f00dd6d754b4333be35","user":{"login":"westurner","id":50891,"avatar_url":"https://avatars.githubusercontent.com/u/50891?v=3","gravatar_id":"","url":"https://api.github.com/users/westurner","html_url":"https://github.com/westurner","followers_url":"https://api.github.com/users/westurner/followers","following_url":"https://api.github.com/users/westurner/following{/other_user}","gists_url":"https://api.github.com/users/westurner/gists{/gist_id}","starred_url":"https://api.github.com/users/westurner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/westurner/subscriptions","organizations_url":"https://api.github.com/users/westurner/orgs","repos_url":"https://api.github.com/users/westurner/repos","events_url":"https://api.github.com/users/westurner/events{/privacy}","received_events_url":"https://api.github.com/users/westurner/received_events","type":"User","site_admin":false},"body":"As far as doing this right the first time, I think it would be good to utilize `mkdtemp` whether or not the temp directory is used.","created_at":"2015-01-25T00:41:17Z","updated_at":"2015-01-25T00:41:17Z","html_url":"https://github.com/westurner/apt-cacher-ng-formula/pull/2#discussion_r23500779","pull_request_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/pulls/comments/23500779"},"html":{"href":"https://github.com/westurner/apt-cacher-ng-formula/pull/2#discussion_r23500779"},"pull_request":{"href":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/pulls/2","id":27153495,"html_url":"https://github.com/westurner/apt-cacher-ng-formula/pull/2","diff_url":"https://github.com/westurner/apt-cacher-ng-formula/pull/2.diff","patch_url":"https://github.com/westurner/apt-cacher-ng-formula/pull/2.patch","issue_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/issues/2","number":2,"state":"open","locked":false,"title":"TST: Test framework","user":{"login":"h4ck3rm1k3","id":34903,"avatar_url":"https://avatars.githubusercontent.com/u/34903?v=3","gravatar_id":"","url":"https://api.github.com/users/h4ck3rm1k3","html_url":"https://github.com/h4ck3rm1k3","followers_url":"https://api.github.com/users/h4ck3rm1k3/followers","following_url":"https://api.github.com/users/h4ck3rm1k3/following{/other_user}","gists_url":"https://api.github.com/users/h4ck3rm1k3/gists{/gist_id}","starred_url":"https://api.github.com/users/h4ck3rm1k3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h4ck3rm1k3/subscriptions","organizations_url":"https://api.github.com/users/h4ck3rm1k3/orgs","repos_url":"https://api.github.com/users/h4ck3rm1k3/repos","events_url":"https://api.github.com/users/h4ck3rm1k3/events{/privacy}","received_events_url":"https://api.github.com/users/h4ck3rm1k3/received_events","type":"User","site_admin":false},"body":"Howdy Wes,\r\nattached is a starting point for testing your formula using salt as a lib not a service.\r\ncheck it out.\r\n\r\nYou are going to want to get my patches for salt here:\r\nsaltstack/salt\r\n* #19617 endless loop  https://github.com/saltstack/salt/pull/19617\r\n* #19615 template debugging https://github.com/saltstack/salt/pull/19615\r\n* #19614 Localtransport  https://github.com/saltstack/salt/pull/19614\r\n","created_at":"2015-01-10T19:39:31Z","updated_at":"2015-01-25T00:41:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bd2e7d15a925dcf387200e8f251c993176c1c02e","assignee":null,"milestone":{"url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/milestones/2","labels_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/milestones/2/labels","id":930203,"number":2,"title":"0.2","description":"","creator":{"login":"westurner","id":50891,"avatar_url":"https://avatars.githubusercontent.com/u/50891?v=3","gravatar_id":"","url":"https://api.github.com/users/westurner","html_url":"https://github.com/westurner","followers_url":"https://api.github.com/users/westurner/followers","following_url":"https://api.github.com/users/westurner/following{/other_user}","gists_url":"https://api.github.com/users/westurner/gists{/gist_id}","starred_url":"https://api.github.com/users/westurner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/westurner/subscriptions","organizations_url":"https://api.github.com/users/westurner/orgs","repos_url":"https://api.github.com/users/westurner/repos","events_url":"https://api.github.com/users/westurner/events{/privacy}","received_events_url":"https://api.github.com/users/westurner/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2015-01-11T04:10:05Z","updated_at":"2015-01-11T04:10:12Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/pulls/2/commits","review_comments_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/pulls/2/comments","review_comment_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/pulls/comments/{number}","comments_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/issues/2/comments","statuses_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/statuses/94f03ad5edb339176e7076b2a61d2e9417e8e0a3","head":{"label":"h4ck3rm1k3:master","ref":"master","sha":"94f03ad5edb339176e7076b2a61d2e9417e8e0a3","user":{"login":"h4ck3rm1k3","id":34903,"avatar_url":"https://avatars.githubusercontent.com/u/34903?v=3","gravatar_id":"","url":"https://api.github.com/users/h4ck3rm1k3","html_url":"https://github.com/h4ck3rm1k3","followers_url":"https://api.github.com/users/h4ck3rm1k3/followers","following_url":"https://api.github.com/users/h4ck3rm1k3/following{/other_user}","gists_url":"https://api.github.com/users/h4ck3rm1k3/gists{/gist_id}","starred_url":"https://api.github.com/users/h4ck3rm1k3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h4ck3rm1k3/subscriptions","organizations_url":"https://api.github.com/users/h4ck3rm1k3/orgs","repos_url":"https://api.github.com/users/h4ck3rm1k3/repos","events_url":"https://api.github.com/users/h4ck3rm1k3/events{/privacy}","received_events_url":"https://api.github.com/users/h4ck3rm1k3/received_events","type":"User","site_admin":false},"repo":{"id":28967655,"name":"apt-cacher-ng-formula","full_name":"h4ck3rm1k3/apt-cacher-ng-formula","owner":{"login":"h4ck3rm1k3","id":34903,"avatar_url":"https://avatars.githubusercontent.com/u/34903?v=3","gravatar_id":"","url":"https://api.github.com/users/h4ck3rm1k3","html_url":"https://github.com/h4ck3rm1k3","followers_url":"https://api.github.com/users/h4ck3rm1k3/followers","following_url":"https://api.github.com/users/h4ck3rm1k3/following{/other_user}","gists_url":"https://api.github.com/users/h4ck3rm1k3/gists{/gist_id}","starred_url":"https://api.github.com/users/h4ck3rm1k3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h4ck3rm1k3/subscriptions","organizations_url":"https://api.github.com/users/h4ck3rm1k3/orgs","repos_url":"https://api.github.com/users/h4ck3rm1k3/repos","events_url":"https://api.github.com/users/h4ck3rm1k3/events{/privacy}","received_events_url":"https://api.github.com/users/h4ck3rm1k3/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/h4ck3rm1k3/apt-cacher-ng-formula","description":"Salt formula for apt-cacher-ng","fork":true,"url":"https://api.github.com/repos/h4ck3rm1k3/apt-cacher-ng-formula","forks_url":"https://api.github.com/repos/h4ck3rm1k3/apt-cacher-ng-formula/forks","keys_url":"https://api.github.com/repos/h4ck3rm1k3/apt-cacher-ng-formula/keys{/key_id}","collaborators_url":"https://api.github.com/repos/h4ck3rm1k3/apt-cacher-ng-formula/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/h4ck3rm1k3/apt-cacher-ng-formula/teams","hooks_url":"https://api.github.com/repos/h4ck3rm1k3/apt-cacher-ng-formula/hooks","issue_events_url":"https://api.github.com/repos/h4ck3rm1k3/apt-cacher-ng-formula/issues/events{/number}","events_url":"https://api.github.com/repos/h4ck3rm1k3/apt-cacher-ng-formula/events","assignees_url":"https://api.github.com/repos/h4ck3rm1k3/apt-cacher-ng-formula/assignees{/user}","branches_url":"https://api.github.com/repos/h4ck3rm1k3/apt-cacher-ng-formula/branches{/branch}","tags_url":"https://api.github.com/repos/h4ck3rm1k3/apt-cacher-ng-formula/tags","blobs_url":"https://api.github.com/repos/h4ck3rm1k3/apt-cacher-ng-formula/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/h4ck3rm1k3/apt-cacher-ng-formula/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/h4ck3rm1k3/apt-cacher-ng-formula/git/refs{/sha}","trees_url":"https://api.github.com/repos/h4ck3rm1k3/apt-cacher-ng-formula/git/trees{/sha}","statuses_url":"https://api.github.com/repos/h4ck3rm1k3/apt-cacher-ng-formula/statuses/{sha}","languages_url":"https://api.github.com/repos/h4ck3rm1k3/apt-cacher-ng-formula/languages","stargazers_url":"https://api.github.com/repos/h4ck3rm1k3/apt-cacher-ng-formula/stargazers","contributors_url":"https://api.github.com/repos/h4ck3rm1k3/apt-cacher-ng-formula/contributors","subscribers_url":"https://api.github.com/repos/h4ck3rm1k3/apt-cacher-ng-formula/subscribers","subscription_url":"https://api.github.com/repos/h4ck3rm1k3/apt-cacher-ng-formula/subscription","commits_url":"https://api.github.com/repos/h4ck3rm1k3/apt-cacher-ng-formula/commits{/sha}","git_commits_url":"https://api.github.com/repos/h4ck3rm1k3/apt-cacher-ng-formula/git/commits{/sha}","comments_url":"https://api.github.com/repos/h4ck3rm1k3/apt-cacher-ng-formula/comments{/number}","issue_comment_url":"https://api.github.com/repos/h4ck3rm1k3/apt-cacher-ng-formula/issues/comments/{number}","contents_url":"https://api.github.com/repos/h4ck3rm1k3/apt-cacher-ng-formula/contents/{+path}","compare_url":"https://api.github.com/repos/h4ck3rm1k3/apt-cacher-ng-formula/compare/{base}...{head}","merges_url":"https://api.github.com/repos/h4ck3rm1k3/apt-cacher-ng-formula/merges","archive_url":"https://api.github.com/repos/h4ck3rm1k3/apt-cacher-ng-formula/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/h4ck3rm1k3/apt-cacher-ng-formula/downloads","issues_url":"https://api.github.com/repos/h4ck3rm1k3/apt-cacher-ng-formula/issues{/number}","pulls_url":"https://api.github.com/repos/h4ck3rm1k3/apt-cacher-ng-formula/pulls{/number}","milestones_url":"https://api.github.com/repos/h4ck3rm1k3/apt-cacher-ng-formula/milestones{/number}","notifications_url":"https://api.github.com/repos/h4ck3rm1k3/apt-cacher-ng-formula/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/h4ck3rm1k3/apt-cacher-ng-formula/labels{/name}","releases_url":"https://api.github.com/repos/h4ck3rm1k3/apt-cacher-ng-formula/releases{/id}","created_at":"2015-01-08T13:44:01Z","updated_at":"2015-01-18T19:39:37Z","pushed_at":"2015-01-18T19:39:37Z","git_url":"git://github.com/h4ck3rm1k3/apt-cacher-ng-formula.git","ssh_url":"git@github.com:h4ck3rm1k3/apt-cacher-ng-formula.git","clone_url":"https://github.com/h4ck3rm1k3/apt-cacher-ng-formula.git","svn_url":"https://github.com/h4ck3rm1k3/apt-cacher-ng-formula","homepage":"","size":132,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"westurner:master","ref":"master","sha":"471cbb92dfd6f14b27a6520f6a76d8ee240cc694","user":{"login":"westurner","id":50891,"avatar_url":"https://avatars.githubusercontent.com/u/50891?v=3","gravatar_id":"","url":"https://api.github.com/users/westurner","html_url":"https://github.com/westurner","followers_url":"https://api.github.com/users/westurner/followers","following_url":"https://api.github.com/users/westurner/following{/other_user}","gists_url":"https://api.github.com/users/westurner/gists{/gist_id}","starred_url":"https://api.github.com/users/westurner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/westurner/subscriptions","organizations_url":"https://api.github.com/users/westurner/orgs","repos_url":"https://api.github.com/users/westurner/repos","events_url":"https://api.github.com/users/westurner/events{/privacy}","received_events_url":"https://api.github.com/users/westurner/received_events","type":"User","site_admin":false},"repo":{"id":22431987,"name":"apt-cacher-ng-formula","full_name":"westurner/apt-cacher-ng-formula","owner":{"login":"westurner","id":50891,"avatar_url":"https://avatars.githubusercontent.com/u/50891?v=3","gravatar_id":"","url":"https://api.github.com/users/westurner","html_url":"https://github.com/westurner","followers_url":"https://api.github.com/users/westurner/followers","following_url":"https://api.github.com/users/westurner/following{/other_user}","gists_url":"https://api.github.com/users/westurner/gists{/gist_id}","starred_url":"https://api.github.com/users/westurner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/westurner/subscriptions","organizations_url":"https://api.github.com/users/westurner/orgs","repos_url":"https://api.github.com/users/westurner/repos","events_url":"https://api.github.com/users/westurner/events{/privacy}","received_events_url":"https://api.github.com/users/westurner/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/westurner/apt-cacher-ng-formula","description":"Salt formula for apt-cacher-ng","fork":false,"url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula","forks_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/forks","keys_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/keys{/key_id}","collaborators_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/teams","hooks_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/hooks","issue_events_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/issues/events{/number}","events_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/events","assignees_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/assignees{/user}","branches_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/branches{/branch}","tags_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/tags","blobs_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/git/refs{/sha}","trees_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/git/trees{/sha}","statuses_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/statuses/{sha}","languages_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/languages","stargazers_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/stargazers","contributors_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/contributors","subscribers_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/subscribers","subscription_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/subscription","commits_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/commits{/sha}","git_commits_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/git/commits{/sha}","comments_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/comments{/number}","issue_comment_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/issues/comments/{number}","contents_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/contents/{+path}","compare_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/compare/{base}...{head}","merges_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/merges","archive_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/downloads","issues_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/issues{/number}","pulls_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/pulls{/number}","milestones_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/milestones{/number}","notifications_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/labels{/name}","releases_url":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/releases{/id}","created_at":"2014-07-30T14:50:23Z","updated_at":"2015-01-08T19:09:54Z","pushed_at":"2015-01-08T19:09:54Z","git_url":"git://github.com/westurner/apt-cacher-ng-formula.git","ssh_url":"git@github.com:westurner/apt-cacher-ng-formula.git","clone_url":"https://github.com/westurner/apt-cacher-ng-formula.git","svn_url":"https://github.com/westurner/apt-cacher-ng-formula","homepage":"","size":147,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/pulls/2"},"html":{"href":"https://github.com/westurner/apt-cacher-ng-formula/pull/2"},"issue":{"href":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/issues/2"},"comments":{"href":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/westurner/apt-cacher-ng-formula/statuses/94f03ad5edb339176e7076b2a61d2e9417e8e0a3"}}}}