Skip to content

Commit 1be215e

Browse files
committed
fix: resolve remaining test warnings
1 parent 74260da commit 1be215e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

tests/btrdb/test_transformers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import pytest
2424
from pandas import DataFrame, Index, Series
2525

26+
from btrdb.conn import BTrDB
2627
from btrdb.point import RawPoint, StatPoint
2728
from btrdb.stream import Stream, StreamSet
2829
from btrdb.transformers import *
@@ -211,6 +212,7 @@ def statpoint_streamset():
211212
stream = Mock(Stream)
212213
type(stream).collection = PropertyMock(return_value="test")
213214
type(stream).name = PropertyMock(return_value="stream{}".format(idx))
215+
stream._btrdb = Mock()
214216
streams.append(stream)
215217

216218
obj = StreamSet(streams)
@@ -796,7 +798,7 @@ def test_to_csv_as_stringio(self, streamset):
796798
result = [dict(row) for row in reader]
797799
for item in result:
798800
for k, v in item.items():
799-
if v is "":
801+
if v == "":
800802
item[k] = None
801803
elif "." in v:
802804
item[k] = float(v)

tests/btrdb/utils/test_credentials.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def test_raises_err_if_credentials_not_found(self, mock_open):
3939

4040

4141
class TestLoadProfile(object):
42-
def setup(self):
42+
def setup_method(self):
4343
for env in ["BTRDB_ENDPOINTS", "BTRDB_PROFILE", "BTRDB_API_KEY"]:
4444
try:
4545
del os.environ[env]
@@ -114,7 +114,7 @@ def test_returns_no_default_profile(self, mock_credentials):
114114

115115

116116
class TestCredentials(object):
117-
def setup(self):
117+
def setup_method(self):
118118
for env in ["BTRDB_ENDPOINTS", "BTRDB_PROFILE", "BTRDB_API_KEY"]:
119119
try:
120120
del os.environ[env]

0 commit comments

Comments
 (0)