spidermon icon indicating copy to clipboard operation
spidermon copied to clipboard

email_subject*: don't fail if SPIDERMON_EMAIL_SUBJECT_TEMPLATE is configured in favor of SPIDERMON_EMAIL_SUBJECT

Open Toritrae opened this issue 6 years ago • 6 comments

Allow usage of SPIDERMON_EMAIL_SUBJECT_TEMPLATE instead of SPIDERMON_EMAIL_SUBJECT without failing during initialization. If EMAIL_SUBJECT is configured it still has precedence.

Toritrae avatar May 03 '19 01:05 Toritrae

:+1: by me.

I must say I’m surprised it passes all checks, though :slightly_smiling_face: . I think Spidermon uses Black, and Black’s line length limit is 88.

Gallaecio avatar May 03 '19 12:05 Gallaecio

I played around with line length a bit, seems it makes no difference to black. I reformatted the message regardless.

Toritrae avatar May 03 '19 15:05 Toritrae

I know that we don't have tests for the actions (and it is something we need to improve), so would you mind create in this PR a new test file for this action and add some tests to make sure that the lack of one of the subject arguments raise an exception? Other tests for other arguments may be created after that (I don't want a PR handles more than one feature).

rennerocha avatar May 03 '19 16:05 rennerocha

No problem, will be some time before I get a shot at this though.

Toritrae avatar May 10 '19 13:05 Toritrae

@Toritrae , would you be able to include the tests for your code?

rennerocha avatar Sep 03 '19 14:09 rennerocha