Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup Test Warnings #503

Merged
merged 1 commit into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading