from django.test import TestCase

from .. import factories


class CoreFactoriesTest(TestCase):
    """
    Ensure factories work as expected.
    Here we just call each one to ensure they do not trigger any random
    error without verifying any other expectation.
    """

    def test_path_factory(self):
        factories.PathFactory()

    def test_topology_mixin_factory(self):
        factories.TopologyFactory()

    def test_path_aggregation_factory(self):
        factories.PathAggregationFactory()

    def test_source_management_factory(self):
        factories.PathSourceFactory()

    def test_challenge_management_factory(self):
        factories.StakeFactory()

    def test_usage_management_factory(self):
        factories.UsageFactory()

    def test_network_management_factory(self):
        factories.NetworkFactory()

    def test_path_management_factory(self):
        factories.TrailFactory()

from django.test import TestCase

from .. import factories


class CoreFactoriesTest(TestCase):
    """
    Ensure factories work as expected.
    Here we just call each one to ensure they do not trigger any random
    error without verifying any other expectation.
    """

    def test_path_factory(self):
        factories.PathFactory()

    def test_topology_mixin_factory(self):
        factories.TopologyFactory()

    def test_path_aggregation_factory(self):
        factories.PathAggregationFactory()

    def test_source_management_factory(self):
        factories.PathSourceFactory()

    def test_challenge_management_factory(self):
        factories.StakeFactory()

    def test_usage_management_factory(self):
        factories.UsageFactory()

    def test_network_management_factory(self):
        factories.NetworkFactory()

    def test_path_management_factory(self):
        factories.TrailFactory()

    def test_path_in_bounds_existing_factory(self):
        factories.PathFactory.create()
        factories.PathInBoundsExistingGeomFactory()

    def test_path_in_bounds_not_existing_factory(self):
        with self.assertRaises(IndexError):
            factories.PathInBoundsExistingGeomFactory()

Add cover test : core factories
Add cover test : core factories

  from django.test import TestCase
  
  from .. import factories
  
  
  class CoreFactoriesTest(TestCase):
      """
      Ensure factories work as expected.
      Here we just call each one to ensure they do not trigger any random
      error without verifying any other expectation.
      """
  
      def test_path_factory(self):
          factories.PathFactory()
  
      def test_topology_mixin_factory(self):
          factories.TopologyFactory()
  
      def test_path_aggregation_factory(self):
          factories.PathAggregationFactory()
  
      def test_source_management_factory(self):
          factories.PathSourceFactory()
  
      def test_challenge_management_factory(self):
          factories.StakeFactory()
  
      def test_usage_management_factory(self):
          factories.UsageFactory()
  
      def test_network_management_factory(self):
          factories.NetworkFactory()
  
      def test_path_management_factory(self):
          factories.TrailFactory()
  
+     def test_path_in_bounds_existing_factory(self):
+         factories.PathFactory.create()
+         factories.PathInBoundsExistingGeomFactory()
+ 
+     def test_path_in_bounds_not_existing_factory(self):
+         with self.assertRaises(IndexError):
+             factories.PathInBoundsExistingGeomFactory()
+ 
Add cover test : core factories
## Code Before:
from django.test import TestCase

from .. import factories


class CoreFactoriesTest(TestCase):
    """
    Ensure factories work as expected.
    Here we just call each one to ensure they do not trigger any random
    error without verifying any other expectation.
    """

    def test_path_factory(self):
        factories.PathFactory()

    def test_topology_mixin_factory(self):
        factories.TopologyFactory()

    def test_path_aggregation_factory(self):
        factories.PathAggregationFactory()

    def test_source_management_factory(self):
        factories.PathSourceFactory()

    def test_challenge_management_factory(self):
        factories.StakeFactory()

    def test_usage_management_factory(self):
        factories.UsageFactory()

    def test_network_management_factory(self):
        factories.NetworkFactory()

    def test_path_management_factory(self):
        factories.TrailFactory()

## Instruction:
Add cover test : core factories
## Code After:
from django.test import TestCase

from .. import factories


class CoreFactoriesTest(TestCase):
    """
    Ensure factories work as expected.
    Here we just call each one to ensure they do not trigger any random
    error without verifying any other expectation.
    """

    def test_path_factory(self):
        factories.PathFactory()

    def test_topology_mixin_factory(self):
        factories.TopologyFactory()

    def test_path_aggregation_factory(self):
        factories.PathAggregationFactory()

    def test_source_management_factory(self):
        factories.PathSourceFactory()

    def test_challenge_management_factory(self):
        factories.StakeFactory()

    def test_usage_management_factory(self):
        factories.UsageFactory()

    def test_network_management_factory(self):
        factories.NetworkFactory()

    def test_path_management_factory(self):
        factories.TrailFactory()

    def test_path_in_bounds_existing_factory(self):
        factories.PathFactory.create()
        factories.PathInBoundsExistingGeomFactory()

    def test_path_in_bounds_not_existing_factory(self):
        with self.assertRaises(IndexError):
            factories.PathInBoundsExistingGeomFactory()
