mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
move telegram fixture to telegram file
This commit is contained in:
parent
da261003df
commit
c37b7b77e4
|
@ -3,7 +3,7 @@ import json
|
|||
import logging
|
||||
import re
|
||||
from copy import deepcopy
|
||||
from datetime import datetime, timedelta
|
||||
from datetime import timedelta
|
||||
from pathlib import Path
|
||||
from typing import Optional
|
||||
from unittest.mock import MagicMock, Mock, PropertyMock
|
||||
|
@ -12,7 +12,6 @@ import arrow
|
|||
import numpy as np
|
||||
import pandas as pd
|
||||
import pytest
|
||||
from telegram import Chat, Message, Update
|
||||
|
||||
from freqtrade import constants
|
||||
from freqtrade.commands import Arguments
|
||||
|
@ -550,13 +549,6 @@ def get_default_conf_usdt(testdatadir):
|
|||
return configuration
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def update():
|
||||
_update = Update(0)
|
||||
_update.message = Message(0, datetime.utcnow(), Chat(0, 0))
|
||||
return _update
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def fee():
|
||||
return MagicMock(return_value=0.0025)
|
||||
|
|
|
@ -43,6 +43,14 @@ def default_conf(default_conf) -> dict:
|
|||
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):
|
||||
"""
|
||||
Dummy class for testing the Telegram @authorized_only decorator
|
||||
|
|
Loading…
Reference in New Issue
Block a user