Conditions | 2 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | # Something that is untested is broken. |
||
24 | def __create_rule(self): |
||
25 | """ |
||
26 | |||
27 | :return int: The id of the new rule |
||
28 | """ |
||
29 | current_sid = NaxsiRules.query.order_by(NaxsiRules.sid.desc()).first() |
||
30 | current_sid = 1337 if current_sid is None else current_sid.sid + 1 |
||
31 | |||
32 | db.session.add(NaxsiRules(u'POUET', 'str:test', u'BODY', u'$SQL:8', current_sid, u'WEB_APPS', |
||
33 | u'f hqewifueiwf hueiwhf uiewh fiewh fhw', '1', True, 1457101045)) |
||
34 | db.session.commit() |
||
35 | self.created_rules.append(current_sid) |
||
36 | return int(current_sid) |
||
37 | |||
45 |