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