def test_changeroute_exception(self, mockconnection, mockinput): mocksql = mock.Mock() mocksql.cursor().execute.side_effect = sqlite3.Error g = Admin(mocksql, 1) m = g.change_route() assert m is False
def test_changeroute(self, mockconnection, mockinput): mocksql = mock.Mock() mocksql.cursor().commit.return_value = True g = Admin(mocksql, 1) m = g.change_route() assert m is True