Skip to content

Commit

Permalink
address most sources of warnings in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TShapinsky committed May 13, 2024
1 parent dfb859f commit 8ecdc2f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 15 deletions.
11 changes: 0 additions & 11 deletions alfalfa_worker/__init__.py

This file was deleted.

2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ markers =
fmu: mark tests that require fmu support, e.g., pyfmi (deselect with '-m "not fmu"')
docker: mark tests that must be run within docker
scale: mark tests that must ben run with multiple workers (deselect with '-m "not scale"')
api: mark tests specific to the API compliance
norecursedirs =
dist
build
Expand Down
6 changes: 3 additions & 3 deletions tests/worker/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


class TestModelsObjects:
def setup(self):
def setup_method(self):
"""Create the connection to the mongodatabase since we are not loading the entire framework.
Note that the config params are monkeypatched in the conftest file"""
connect(host=f"{os.environ['MONGO_URL']}/{os.environ['MONGO_DB_NAME']}", uuidrepresentation='standard')
Expand All @@ -39,7 +39,7 @@ def test_create_and_destroy_site(self):

class TestModelObjectsWithFixtures():

def setup(self):
def setup_method(self):
"""Create the connection to the mongodatabase since we are not loading the entire framework.
Note that the config params are monkeypatched in the conftest file"""
connect(host=f"{os.environ['MONGO_URL']}/{os.environ['MONGO_DB_NAME']}", uuidrepresentation='standard')
Expand Down Expand Up @@ -67,7 +67,7 @@ def setup(self):

# TODO: grab the model object from the database and attach

def teardown(self):
def teardown_method(self):
"""Remove all the data that was generated during this test"""
for datum in site_data:
site = Site.objects(ref_id=datum['ref_id']).first()
Expand Down

0 comments on commit 8ecdc2f

Please sign in to comment.