def test_vote_locked_form1(self): # type: () -> None do_test_vote(self, "user1", ["Vim", "Sublime", "Windows"], ["Atom", "Linux"], ["Sublime"], 200, ["Vim", "Sublime", "Linux"], locked_titles=["Text Editor"])
def test_vote_form_empty(self): # type: () -> None do_test_vote(self, "user1", None, None, None, 200, []) do_test_vote(self, "user2", None, None, None, 200, [], "application/json") do_test_vote(self, "user3", None, None, None, 200, [], FORM_CONTENT_TYPE) do_test_vote(self, "user1", None, None, None, 200, [], "application/json;") do_test_vote(self, "user2", None, None, None, 200, [], FORM_CONTENT_TYPE + ";")
def test_vote_locked_form2(self): # type: () -> None do_test_vote(self, "user3", ["Vim", "Sublime", "Windows"], ["Atom", "Linux"], ["Sublime"], 200, ["Vim", "Sublime", "Linux"], FORM_CONTENT_TYPE, locked_titles=["Text Editor"])
def test_vote_locked_json(self): # type: () -> None do_test_vote(self, "user2", ["Vim", "Sublime", "Windows"], ["Atom", "Linux"], ["Sublime"], 200, ["Vim", "Sublime", "Linux"], "application/json", locked_titles=["Text Editor"])
def test_vote_inboth(self): # type: () -> None do_test_vote(self, "user1", ["Vim", "Sublime"], ["Vim", "Atom"], ["Vim"], 400, ["Vim", "Sublime"]) do_test_vote(self, "user2", ["Vim", "Sublime"], ["Vim", "Atom"], ["Vim"], 400, ["Vim", "Sublime"], "application/json") do_test_vote(self, "user3", ["Vim", "Sublime"], ["Vim", "Atom"], ["Vim"], 400, ["Vim", "Sublime"], FORM_CONTENT_TYPE)
def test_vote_unchoose_only(self): # type: () -> None do_test_vote(self, "user1", ["Vim", "Atom"], None, ["Vim", "Linux"], 200, ["Atom"]) do_test_vote(self, "user2", ["Vim", "Atom"], None, ["Vim", "Linux"], 200, ["Atom"], "application/json") do_test_vote(self, "user3", ["Vim", "Atom"], None, ["Vim", "Linux"], 200, ["Atom"], FORM_CONTENT_TYPE)
def test_vote_num_inboth(self): # type: () -> None do_test_vote(self, "user2", ["Vim", "Sublime"], ["Vim", "Atom"], ["Vim"], 400, ["Vim", "Sublime"], "application/json", True)
def test_vote_num_unchoose_only(self): # type: () -> None do_test_vote(self, "user1", ["Vim", "Atom"], None, ["Vim", "Linux"], 200, ["Atom"], "application/json", True)