API - use same tile server as Client to generate staticmap - fix #83
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
from typing import Any
|
||||
from unittest.mock import Mock, patch
|
||||
|
||||
from flask import Flask
|
||||
@ -6,6 +5,7 @@ from flask import Flask
|
||||
from fittrackee import email_service
|
||||
from fittrackee.emails.email import EmailMessage
|
||||
|
||||
from ..api_test_case import CallArgsMixin
|
||||
from .template_results.password_reset_request import expected_en_text_body
|
||||
|
||||
|
||||
@ -32,7 +32,7 @@ class TestEmailMessage:
|
||||
assert 'Hello !' in message_string
|
||||
|
||||
|
||||
class TestEmailSending:
|
||||
class TestEmailSending(CallArgsMixin):
|
||||
|
||||
email_data = {
|
||||
'expiration_delay': '3 seconds',
|
||||
@ -42,14 +42,6 @@ class TestEmailSending:
|
||||
'browser_name': 'Firefox',
|
||||
}
|
||||
|
||||
@staticmethod
|
||||
def get_args(call_args: Any) -> Any:
|
||||
if len(call_args) == 2:
|
||||
args, _ = call_args
|
||||
else:
|
||||
_, args, _ = call_args
|
||||
return args
|
||||
|
||||
def assert_smtp(self, smtp: Mock) -> None:
|
||||
assert smtp.sendmail.call_count == 1
|
||||
call_args = self.get_args(smtp.sendmail.call_args)
|
||||
|
Reference in New Issue
Block a user