import factory
import random
from billing.models import Billing, OrderBilling
from member.factories import ClientFactory
from order.factories import OrderFactory


class BillingFactory(factory.DjangoModelFactory):

    class Meta:
        model = Billing

    client = factory.SubFactory(ClientFactory)

    total_amount = random.randrange(1, stop=75, step=1)

    billing_month = random.randrange(1, stop=12, step=1)

    billing_year = random.randrange(2016, stop=2020, step=1)

    detail = {"123": 123}


class BillingOrder(factory.DjangoModelFactory):
    billing_id = BillingFactory().id

    order_id = OrderFactory()

import factory
import random
from billing.models import Billing, OrderBilling
from member.factories import ClientFactory
from order.factories import OrderFactory


class BillingFactory(factory.DjangoModelFactory):

    class Meta:
        model = Billing

    client = factory.SubFactory(ClientFactory)

    total_amount = random.randrange(1, stop=75, step=1)

    billing_month = random.randrange(1, stop=12, step=1)

    billing_year = random.randrange(2016, stop=2020, step=1)

    detail = {"123": 123}

Remove a BillingOrder factory class that wasn't use
Remove a BillingOrder factory class that wasn't use

There was a problem with this class... but since I couldn't find
code using it, I simply deleted it.

  import factory
  import random
  from billing.models import Billing, OrderBilling
  from member.factories import ClientFactory
  from order.factories import OrderFactory
  
  
  class BillingFactory(factory.DjangoModelFactory):
  
      class Meta:
          model = Billing
  
      client = factory.SubFactory(ClientFactory)
  
      total_amount = random.randrange(1, stop=75, step=1)
  
      billing_month = random.randrange(1, stop=12, step=1)
  
      billing_year = random.randrange(2016, stop=2020, step=1)
  
      detail = {"123": 123}
  
- 
- class BillingOrder(factory.DjangoModelFactory):
-     billing_id = BillingFactory().id
- 
-     order_id = OrderFactory()
- 
Remove a BillingOrder factory class that wasn't use
## Code Before:
import factory
import random
from billing.models import Billing, OrderBilling
from member.factories import ClientFactory
from order.factories import OrderFactory


class BillingFactory(factory.DjangoModelFactory):

    class Meta:
        model = Billing

    client = factory.SubFactory(ClientFactory)

    total_amount = random.randrange(1, stop=75, step=1)

    billing_month = random.randrange(1, stop=12, step=1)

    billing_year = random.randrange(2016, stop=2020, step=1)

    detail = {"123": 123}


class BillingOrder(factory.DjangoModelFactory):
    billing_id = BillingFactory().id

    order_id = OrderFactory()

## Instruction:
Remove a BillingOrder factory class that wasn't use
## Code After:
import factory
import random
from billing.models import Billing, OrderBilling
from member.factories import ClientFactory
from order.factories import OrderFactory


class BillingFactory(factory.DjangoModelFactory):

    class Meta:
        model = Billing

    client = factory.SubFactory(ClientFactory)

    total_amount = random.randrange(1, stop=75, step=1)

    billing_month = random.randrange(1, stop=12, step=1)

    billing_year = random.randrange(2016, stop=2020, step=1)

    detail = {"123": 123}
