-
-
Notifications
You must be signed in to change notification settings - Fork 587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MIG] mail_tracking_mass_mailing: Migration to 10.0 #174
[MIG] mail_tracking_mass_mailing: Migration to 10.0 #174
Conversation
4e0181a
to
9c82fc3
Compare
Check error on tests.
|
@pedrobaeza that error comes generated from the mock function inside here https://github.com/Tecnativa/social/blob/9c82fc3b218be0b8fc144f1dacc8a279676102d1/mail_tracking_mass_mailing/tests/test_mass_mailing.py#L37 The same mock error is raised in |
Seems like that test you link tries to disable mail sending in the test, but after all that's done by default in Odoo. Maybe the mock can be simply dropped there. |
@yajo I was doing some quick tests with your suggestions and indeed Odoo mail sending is dummy on tests. Wich is a problem here because we need to raise such errors 😕 |
I see what is happening. Travis reads the test output and fails if it detects any error log, which is happening in your build because it's the expected behaviour you are testing. So, to get it green again, you will have to mute the logger. Following this suggestion you can disable a certain logger under |
@yajo That was it 😃 |
I think you should be more specific and put it before and after the line it generates the error, or you will mute other possible errors. |
@pedrobaeza Yes, that's better. Done. |
But you haven't changed the restore to immediately after... |
ca34e9e
to
7dfa753
Compare
@pedrobaeza Quite right... 😅 Amended |
Now travis is ❌ |
This is because mail_tracking needs the same kind of patch. |
@chienandalu Could you fix it as well in mail_tracking? |
7dfa753
to
5c8c0b1
Compare
All green now 🙂 |
@@ -34,8 +36,9 @@ def setUp(self, *args, **kwargs): | |||
}) | |||
|
|||
def test_smtp_error(self): | |||
logging.disable(logging.CRITICAL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use mute_logger also?
@chienandalu please squash your last 2 commits and I'll merge. |
[ADD] mail_tracking_mass_mailing ============================== Mail tracking for mass mailing ============================== Links mail statistics objects with mail tracking objects. Installation ============ This addon will be automatically installed when 'mail_tracking' and 'mass_mailing' are both installed Usage ===== From mail statistic object, you can see: - Email tracking state - Email related tracking object - Email related tracking events From mass mailing contact, you can see: - Email score, in order to clean up your lists from bad score emails As a bonus feature, you have a new checkbox 'Avoid resend' in mass mailing, in order to not send twice the same email to the same recipient. This is very useful when you want to resend the mass mailing after changing selection recipients. Notice that recipient selection could be a domain over a model, so result ids could change over the time. With this flag you can send the same email several times but only once to each recipient.
8919239
to
b5b9200
Compare
@pedrobaeza Squashed |
Mail tracking for mass mailing
Links mail statistics objects with mail tracking objects.
cc @Tecnativa