move telegram fixture to telegram file
This commit is contained in:
+1
-9
@@ -3,7 +3,7 @@ import json
|
|||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
from datetime import datetime, timedelta
|
from datetime import timedelta
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
from unittest.mock import MagicMock, Mock, PropertyMock
|
from unittest.mock import MagicMock, Mock, PropertyMock
|
||||||
@@ -12,7 +12,6 @@ import arrow
|
|||||||
import numpy as np
|
import numpy as np
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
import pytest
|
import pytest
|
||||||
from telegram import Chat, Message, Update
|
|
||||||
|
|
||||||
from freqtrade import constants
|
from freqtrade import constants
|
||||||
from freqtrade.commands import Arguments
|
from freqtrade.commands import Arguments
|
||||||
@@ -550,13 +549,6 @@ def get_default_conf_usdt(testdatadir):
|
|||||||
return configuration
|
return configuration
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
|
||||||
def update():
|
|
||||||
_update = Update(0)
|
|
||||||
_update.message = Message(0, datetime.utcnow(), Chat(0, 0))
|
|
||||||
return _update
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def fee():
|
def fee():
|
||||||
return MagicMock(return_value=0.0025)
|
return MagicMock(return_value=0.0025)
|
||||||
|
|||||||
@@ -43,6 +43,14 @@ def default_conf(default_conf) -> dict:
|
|||||||
return default_conf
|
return default_conf
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
def update():
|
||||||
|
message = Message(0, datetime.utcnow(), Chat(0, 0))
|
||||||
|
_update = Update(0, message=message)
|
||||||
|
|
||||||
|
return _update
|
||||||
|
|
||||||
|
|
||||||
class DummyCls(Telegram):
|
class DummyCls(Telegram):
|
||||||
"""
|
"""
|
||||||
Dummy class for testing the Telegram @authorized_only decorator
|
Dummy class for testing the Telegram @authorized_only decorator
|
||||||
|
|||||||
Reference in New Issue
Block a user