2 Commits

Author SHA1 Message Date
  Yann Weber b76fa52c45 Initial commit 1 week ago
  Yann Weber a3d4e0adea Initial commit 1 week ago
1 changed files with 4 additions and 5 deletions
  1. 4
    5
      rspamd_

+ 4
- 5
rspamd_ View File

35
 import unittest
35
 import unittest
36
 import unittest.mock
36
 import unittest.mock
37
 import tempfile
37
 import tempfile
38
-from typing import Final
39
 import contextlib
38
 import contextlib
40
 
39
 
41
 
40
 
58
     return re.sub(r"[\.\- ]", "_", name)
57
     return re.sub(r"[\.\- ]", "_", name)
59
 
58
 
60
 
59
 
61
-CONFIGS: Final = {
60
+CONFIGS = {
62
     "actions": [
61
     "actions": [
63
         lambda data: """\
62
         lambda data: """\
64
 graph_title Rspamd actions
63
 graph_title Rspamd actions
100
 graph_category antispam
99
 graph_category antispam
101
 graph_scale yes
100
 graph_scale yes
102
 spam.label Spams
101
 spam.label Spams
103
-spam.draw STACK
102
+spam.draw AREA
104
 ham.label Ham
103
 ham.label Ham
105
 ham.draw STACK""",
104
 ham.draw STACK""",
106
         lambda data: """\
105
         lambda data: """\
305
 # Tests
304
 # Tests
306
 #
305
 #
307
 
306
 
308
-JSON: Final = r"""{\
307
+JSON = r"""{\
309
 "version":"3.4","config_id":"1234","uptime":16991,"read_only":false,\
308
 "version":"3.4","config_id":"1234","uptime":16991,"read_only":false,\
310
 "scanned":43,"learned":43,"actions":\
309
 "scanned":43,"learned":43,"actions":\
311
 {"reject":0,"soft reject":0,"rewrite subject":0,"add header":5,\
310
 {"reject":0,"soft reject":0,"rewrite subject":0,"add header":5,\
324
 "type":"redis","languages":0,"users":1}],\
323
 "type":"redis","languages":0,"users":1}],\
325
 "fuzzy_hashes":{"local":0,"rspamd.com":1872513971},"scan_time":0.02}"""
324
 "fuzzy_hashes":{"local":0,"rspamd.com":1872513971},"scan_time":0.02}"""
326
 
325
 
327
-EXPTS: Final = {
326
+EXPTS = {
328
     "actions": [
327
     "actions": [
329
         "reject.value 0",
328
         "reject.value 0",
330
         "soft_reject.value 0",
329
         "soft_reject.value 0",

Loading…
Cancel
Save