# Path: apps/taxonomy/tests/factories.py
# class LanguageFactory(factory.django.DjangoModelFactory):
#     class Meta:
# class TaxonRankFactory(factory.django.DjangoModelFactory):
#     class Meta:
# class TreeFactory(factory.django.DjangoModelFactory):
#     class Meta:
# class TaxonNameConceptFactory(factory.django.DjangoModelFactory):
#     class Meta:
# class TaxonNodeFactory(factory.django.DjangoModelFactory):
#     class Meta:
# class ActFactory(factory.django.DjangoModelFactory):
#     class Meta:
# class EdgeFactory(factory.django.DjangoModelFactory):
#     class Meta:
# class TraversalOrderFactory(factory.django.DjangoModelFactory):
#     class Meta:
# class CommonNameFactory(factory.django.DjangoModelFactory):
#     class Meta:
# class HybridTaxonNodeFactory(factory.django.DjangoModelFactory):
#     class Meta:
# class FilterFactory(factory.django.DjangoModelFactory):
#     class Meta:


from django.test import TestCase
from apps.taxonomy.tests import factories
from django.contrib.auth.models import User
from rest_framework import status
        taxonnode_3 = self.create_working_taxonnode(tree, True)
        taxonnode_4 = self.create_working_taxonnode(tree, True)
        taxonnode_5 = self.create_working_taxonnode(tree, True)
        taxonnode_6 = self.create_working_taxonnode(tree, True)
        taxonnode_7 = self.create_working_taxonnode(tree, True)
        taxonnode_8 = self.create_working_taxonnode(tree)
        taxonnode_8.valid_name, taxonnode_8.synonym_type, taxonnode_8.parent_described_in = taxonnode_7, "synonym", taxonnode_6
        taxonnode_8.save()
        self.TAXON_NODE_LIST = [taxonnode_1, taxonnode_2, taxonnode_3, taxonnode_4, taxonnode_5, taxonnode_6, taxonnode_7, taxonnode_8]

        # connect node 1 to its children
        factories.EdgeFactory(ancestor=taxonnode_1, descendant=taxonnode_2, length=1)
        factories.EdgeFactory(ancestor=taxonnode_1, descendant=taxonnode_3, length=2)
        factories.EdgeFactory(ancestor=taxonnode_1, descendant=taxonnode_4, length=3)
        factories.EdgeFactory(ancestor=taxonnode_1, descendant=taxonnode_5, length=3)
        factories.EdgeFactory(ancestor=taxonnode_1, descendant=taxonnode_6, length=2)
        factories.EdgeFactory(ancestor=taxonnode_1, descendant=taxonnode_7, length=3)
        # connect node 2 to its children
        factories.EdgeFactory(ancestor=taxonnode_2, descendant=taxonnode_3, length=1)
        factories.EdgeFactory(ancestor=taxonnode_2, descendant=taxonnode_4, length=2)
        factories.EdgeFactory(ancestor=taxonnode_2, descendant=taxonnode_5, length=2)
        factories.EdgeFactory(ancestor=taxonnode_2, descendant=taxonnode_6, length=1)
        factories.EdgeFactory(ancestor=taxonnode_2, descendant=taxonnode_7, length=2)
        # connect node 3 to its children
        factories.EdgeFactory(ancestor=taxonnode_3, descendant=taxonnode_4, length=1)
        factories.EdgeFactory(ancestor=taxonnode_3, descendant=taxonnode_5, length=1)
        # connect node 6 to its children
        factories.EdgeFactory(ancestor=taxonnode_6, descendant=taxonnode_7, length=1)

        # create traversalorders

# Path: apps/taxonomy/tests/factories.py
# class LanguageFactory(factory.django.DjangoModelFactory):
#     class Meta:
# class TaxonRankFactory(factory.django.DjangoModelFactory):
#     class Meta:
# class TreeFactory(factory.django.DjangoModelFactory):
#     class Meta:
# class TaxonNameConceptFactory(factory.django.DjangoModelFactory):
#     class Meta:
# class TaxonNodeFactory(factory.django.DjangoModelFactory):
#     class Meta:
# class ActFactory(factory.django.DjangoModelFactory):
#     class Meta:
# class EdgeFactory(factory.django.DjangoModelFactory):
#     class Meta:
# class TraversalOrderFactory(factory.django.DjangoModelFactory):
#     class Meta:
# class CommonNameFactory(factory.django.DjangoModelFactory):
#     class Meta:
# class HybridTaxonNodeFactory(factory.django.DjangoModelFactory):
#     class Meta:
# class FilterFactory(factory.django.DjangoModelFactory):
#     class Meta:


# Path: apps/taxonomy/tests/base.py
from django.test import TestCase
from apps.taxonomy.tests import factories
from django.contrib.auth.models import User
from rest_framework import status

        taxonnode_3 = self.create_working_taxonnode(tree, True)
        taxonnode_4 = self.create_working_taxonnode(tree, True)
        taxonnode_5 = self.create_working_taxonnode(tree, True)
        taxonnode_6 = self.create_working_taxonnode(tree, True)
        taxonnode_7 = self.create_working_taxonnode(tree, True)
        taxonnode_8 = self.create_working_taxonnode(tree)
        taxonnode_8.valid_name, taxonnode_8.synonym_type, taxonnode_8.parent_described_in = taxonnode_7, "synonym", taxonnode_6
        taxonnode_8.save()
        self.TAXON_NODE_LIST = [taxonnode_1, taxonnode_2, taxonnode_3, taxonnode_4, taxonnode_5, taxonnode_6, taxonnode_7, taxonnode_8]

        # connect node 1 to its children
        factories.EdgeFactory(ancestor=taxonnode_1, descendant=taxonnode_2, length=1)
        factories.EdgeFactory(ancestor=taxonnode_1, descendant=taxonnode_3, length=2)
        factories.EdgeFactory(ancestor=taxonnode_1, descendant=taxonnode_4, length=3)
        factories.EdgeFactory(ancestor=taxonnode_1, descendant=taxonnode_5, length=3)
        factories.EdgeFactory(ancestor=taxonnode_1, descendant=taxonnode_6, length=2)
        factories.EdgeFactory(ancestor=taxonnode_1, descendant=taxonnode_7, length=3)
        # connect node 2 to its children
        factories.EdgeFactory(ancestor=taxonnode_2, descendant=taxonnode_3, length=1)
        factories.EdgeFactory(ancestor=taxonnode_2, descendant=taxonnode_4, length=2)
        factories.EdgeFactory(ancestor=taxonnode_2, descendant=taxonnode_5, length=2)
        factories.EdgeFactory(ancestor=taxonnode_2, descendant=taxonnode_6, length=1)
        factories.EdgeFactory(ancestor=taxonnode_2, descendant=taxonnode_7, length=2)
        # connect node 3 to its children
        factories.EdgeFactory(ancestor=taxonnode_3, descendant=taxonnode_4, length=1)
        factories.EdgeFactory(ancestor=taxonnode_3, descendant=taxonnode_5, length=1)
        # connect node 6 to its children
        factories.EdgeFactory(ancestor=taxonnode_6, descendant=taxonnode_7, length=1)

        # create traversalorders

        factories.TraversalOrderFactory(current=taxonnode_2, previous=taxonnode_7, next=taxonnode_3)