GitHub PullRequestReviewCommentEvent at 2014-02-15 01:12:19
Repository: corporate
Actor: your-mom-noob
Payload: {"comment":{"url":"https://api.github.com/repos/Neamar/corporate/pulls/comments/9770066","id":9770066,"diff_hunk":"@@ -0,0 +1,270 @@\n+from engine.models import Player\n+from engine.testcases import EngineTestCase\n+from engine.exceptions import OrderNotAvailable\n+from engine_modules.share.models import Share\n+from engine_modules.mdc.models import MDCVoteOrder, MDCVoteSession\n+from engine_modules.corporation.models import Corporation\n+from engine_modules.speculation.models import Derivative, CorporationSpeculationOrder, DerivativeSpeculationOrder\n+\n+from engine_modules.mdc.tasks import MDCLineCPUBTask\n+\n+class TaskTest(EngineTestCase):\n+\tdef setUp(self):\n+\t\tsuper(TaskTest, self).setUp()\n+\n+\t\tself.p2 = Player(game=self.g)\n+\t\tself.p2.save()\n+\n+\t\tself.p3 = Player(game=self.g)\n+\t\tself.p3.save()\n+\n+\t\tself.g.corporation_set.all().delete()\n+\t\tself.c = Corporation(base_corporation_slug='renraku', assets=20)\n+\t\tself.g.corporation_set.add(self.c)\n+\t\tself.c2 = Corporation(base_corporation_slug='shiawase', assets=10)\n+\t\tself.g.corporation_set.add(self.c2)\n+\t\tself.c3 = Corporation(base_corporation_slug='ares', assets=10)\n+\t\tself.g.corporation_set.add(self.c3)\n+\n+\t\tself.s = Share(\n+\t\t\tcorporation=self.c,\n+\t\t\tplayer=self.p,\n+\t\t\tturn=self.g.current_turn\n+\t\t)\n+\t\tself.s.save()\n+\n+\t\tself.s2 = Share(\n+\t\t\tcorporation=self.c2,\n+\t\t\tplayer=self.p2,\n+\t\t\tturn=self.g.current_turn\n+\t\t)\n+\t\tself.s2.save()\n+\n+\t\tself.s3 = Share(\n+\t\t\tcorporation=self.c3,\n+\t\t\tplayer=self.p3,\n+\t\t\tturn=self.g.current_turn\n+\t\t)\n+\t\tself.s3.save()\n+\n+\t\tself.v = MDCVoteOrder(\n+\t\t\tplayer=self.p,\n+\t\t\tparty_line=MDCVoteOrder.DERE\n+\t\t)\n+\t\tself.v.save()\n+\n+\t\tself.v2 = MDCVoteOrder(\n+\t\t\tplayer=self.p2,\n+\t\t\tparty_line=MDCVoteOrder.CPUB\n+\t\t)\n+\t\tself.v2.save()\n+\n+\t\tself.v3 = MDCVoteOrder(\n+\t\t\tplayer=self.p3,\n+\t\t\tparty_line=MDCVoteOrder.DEVE\n+\t\t)\n+\t\tself.v3.save()\n+\n+\t\tself.g.disable_invisible_hand = True\n+\t\tself.g.save()\n+\n+\n+\tdef test_MDC_CPUB_line_effects(self):\n+\t\t\"\"\"\n+\t\tTest what happens when the CPUB party line is chosen\n+\t\t\"\"\"\n+\n+\t\tinitial_assets = self.c.assets\n+\t\tinitial_assets2 = self.c2.assets\n+\t\tinitial_assets3 = self.c3.assets\n+\t\t\n+\t\tself.v.party_line = MDCVoteOrder.CPUB\n+\t\tself.v.save()\n+\n+\t\tself.v2.party_line = MDCVoteOrder.CPUB\n+\t\tself.v2.save()\n+\n+\t\tself.v3.party_line = MDCVoteOrder.DEVE\n+\t\tself.v3.save()\n+\n+\t\tself.g.resolve_current_turn()\n+\n+\t\t# We have to resolve twice: once for the MDCVoteOrders to be taken into account\n+\t\t# And once for the resulting MDCVoteSession to be effective\n+\t\tself.g.resolve_current_turn()","path":"engine_modules/mdc/tests/test_mdc_party_lines.py","position":93,"original_position":94,"commit_id":"567ecdd2ed014af24a8c869e92d598b359601596","original_commit_id":"149f91b3aee773277cae687d54484b2d481e7803","user":{"login":"your-mom-noob","id":4883483,"avatar_url":"https://gravatar.com/avatar/712347491f86364c16e73c64a81daa4d?d=https%3A%2F%2Fidenticons.github.com%2F142e49131c4fad91eb43adefd9c220c7.png&r=x","gravatar_id":"712347491f86364c16e73c64a81daa4d","url":"https://api.github.com/users/your-mom-noob","html_url":"https://github.com/your-mom-noob","followers_url":"https://api.github.com/users/your-mom-noob/followers","following_url":"https://api.github.com/users/your-mom-noob/following{/other_user}","gists_url":"https://api.github.com/users/your-mom-noob/gists{/gist_id}","starred_url":"https://api.github.com/users/your-mom-noob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/your-mom-noob/subscriptions","organizations_url":"https://api.github.com/users/your-mom-noob/orgs","repos_url":"https://api.github.com/users/your-mom-noob/repos","events_url":"https://api.github.com/users/your-mom-noob/events{/privacy}","received_events_url":"https://api.github.com/users/your-mom-noob/received_events","type":"User","site_admin":false},"body":"\"immediate\" doesn't mean anything in such a setting. If it should be applied during the turn of the vote, when exactly should that take place  ?","created_at":"2014-02-15T01:12:19Z","updated_at":"2014-02-15T01:12:19Z","html_url":"https://github.com/Neamar/corporate/pull/40#discussion_r9770066","pull_request_url":"https://api.github.com/repos/Neamar/corporate/pulls/40","_links":{"self":{"href":"https://api.github.com/repos/Neamar/corporate/pulls/comments/9770066"},"html":{"href":"https://github.com/Neamar/corporate/pull/40#discussion_r9770066"},"pull_request":{"href":"https://api.github.com/repos/Neamar/corporate/pulls/40"}}}}