Skip to content

Commit

Permalink
chore: fixes PytestCollectionWarnings
Browse files Browse the repository at this point in the history
  • Loading branch information
pomegranited committed Oct 4, 2023
1 parent ccdb523 commit 736a94c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions tests/openedx_tagging/core/tagging/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def setup_tag_depths(self):
tag.depth = 2


class TestTaxonomySubclassA(Taxonomy):
class TaxonomyTestSubclassA(Taxonomy):
"""
Model A for testing the taxonomy subclass casting.
"""
Expand All @@ -155,7 +155,7 @@ class Meta:
app_label = "oel_tagging"


class TestTaxonomySubclassB(TestTaxonomySubclassA):
class TaxonomyTestSubclassB(TaxonomyTestSubclassA):
"""
Model B for testing the taxonomy subclass casting.
"""
Expand All @@ -166,7 +166,7 @@ class Meta:
app_label = "oel_tagging"


class TestObjectTagSubclass(ObjectTag):
class ObjectTagTestSubclass(ObjectTag):
"""
Model for testing the ObjectTag copy.
"""
Expand Down Expand Up @@ -200,9 +200,9 @@ def test_representations(self):

def test_taxonomy_cast(self):
for subclass in (
TestTaxonomySubclassA,
TaxonomyTestSubclassA,
# Ensure that casting to a sub-subclass works as expected
TestTaxonomySubclassB,
TaxonomyTestSubclassB,
# and that we can un-set the subclass
None,
):
Expand Down Expand Up @@ -349,11 +349,11 @@ def test_representations(self):
)

def test_cast(self):
copy_tag = TestObjectTagSubclass.cast(self.object_tag)
copy_tag = ObjectTagTestSubclass.cast(self.object_tag)
assert (
str(copy_tag)
== repr(copy_tag)
== "<TestObjectTagSubclass> object:id:1: Life on Earth=Bacteria"
== "<ObjectTagTestSubclass> object:id:1: Life on Earth=Bacteria"
)

def test_object_tag_name(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class EmptyTestClass:
"""


class TestLPTaxonomy(ModelSystemDefinedTaxonomy):
class LPTaxonomyTest(ModelSystemDefinedTaxonomy):
"""
Model used for testing - points to LearningPackage instances
"""
Expand All @@ -54,7 +54,7 @@ class Meta:
app_label = "oel_tagging"


class CaseInsensitiveTitleLPTaxonomy(TestLPTaxonomy):
class CaseInsensitiveTitleLPTaxonomy(LPTaxonomyTest):
"""
Model that points to LearningPackage instances but uses 'title' as values
"""
Expand Down Expand Up @@ -89,8 +89,8 @@ def setUpClass(cls):
# Create two learning packages and a taxonomy that can tag any object using learning packages as tags:
cls.learning_pkg_1 = cls._create_learning_pkg(key="p1", title="Learning Package 1")
cls.learning_pkg_2 = cls._create_learning_pkg(key="p2", title="Learning Package 2")
cls.lp_taxonomy = TestLPTaxonomy.objects.create(
taxonomy_class=TestLPTaxonomy,
cls.lp_taxonomy = LPTaxonomyTest.objects.create(
taxonomy_class=LPTaxonomyTest,
name="LearningPackage Taxonomy",
allow_multiple=True,
)
Expand Down

0 comments on commit 736a94c

Please sign in to comment.