def test_valid_query_for_invalid_query_with_comment_block(self): query_template = """/*aaa*/INSERT DATA INTO <xubi> { <1> <2> <3> } """ response = crud._allowed_query(query_template) self.assertFalse(response)
def test_valid_query_for_invalid_query_2(self): query_template = """INSERT DATA INTO <xubi> { <1> <2> <3> } """ response = crud._allowed_query(query_template) self.assertFalse(response)
def test_valid_query_for_with_comment_block(self): query_template = """ /*INSERT comment modify */SELECT * { <1> insert:xubiru ?modify } """ response = crud._allowed_query(query_template) self.assertTrue(response)
def test_valid_query(self): query_template = """ SELECT * { <1> insert:xubiru ?modify } """ response = crud._allowed_query(query_template) self.assertTrue(response)