mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-01-20 14:00:38 +00:00
move telegram fixture to telegram file
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user