import json

from silver.models import Plan

from django.test.client import Client
from django.test import TestCase


class PlansSpecificationTestCase(TestCase):
    def setUp(self):
        self.client = Client()

    def test_create_plan(self):
        response = self.client.put('/api/plans', json.dumps({
            'name': 'Hydrogen',
            'interval': 'month',
            'interval_count': 1,
            'amount': 150,
            'currency': 'USD',
            'trial_period_days': 15,
            'metered_features': [
                {
                    'name': '100k PageViews',
                    'price_per_unit': 10,
                    'included_units': 5
                }
            ],
            'due_days': 10,
            'generate_after': 86400
        }), content_type='application/json')

        plan = Plan.objects.filter(name='Hydrogen')
        self.assertEqual(plan.count(), 1)
        self.assertEqual(response.status_code, 201)

import json

from silver.models import Plan

from django.test.client import Client
from django.test import TestCase


class PlansSpecificationTestCase(TestCase):
    def setUp(self):
        self.client = Client()

    def test_create_plan(self):
        assert True
        # response = self.client.put('/api/plans', json.dumps({
            # 'name': 'Hydrogen',
            # 'interval': 'month',
            # 'interval_count': 1,
            # 'amount': 150,
            # 'currency': 'USD',
            # 'trial_period_days': 15,
            # 'metered_features': [
                # {
                    # 'name': '100k PageViews',
                    # 'price_per_unit': 10,
                    # 'included_units': 5
                # }
            # ],
            # 'due_days': 10,
            # 'generate_after': 86400
        # }), content_type='application/json')

        # plan = Plan.objects.filter(name='Hydrogen')
        # self.assertEqual(plan.count(), 1)
        # self.assertEqual(response.status_code, 201)

Comment out the failing Plan test
Comment out the failing Plan test

  import json
  
  from silver.models import Plan
  
  from django.test.client import Client
  from django.test import TestCase
  
  
  class PlansSpecificationTestCase(TestCase):
      def setUp(self):
          self.client = Client()
  
      def test_create_plan(self):
+         assert True
-         response = self.client.put('/api/plans', json.dumps({
+         # response = self.client.put('/api/plans', json.dumps({
-             'name': 'Hydrogen',
+             # 'name': 'Hydrogen',
-             'interval': 'month',
+             # 'interval': 'month',
-             'interval_count': 1,
+             # 'interval_count': 1,
-             'amount': 150,
+             # 'amount': 150,
-             'currency': 'USD',
+             # 'currency': 'USD',
-             'trial_period_days': 15,
+             # 'trial_period_days': 15,
-             'metered_features': [
+             # 'metered_features': [
-                 {
+                 # {
-                     'name': '100k PageViews',
+                     # 'name': '100k PageViews',
-                     'price_per_unit': 10,
+                     # 'price_per_unit': 10,
-                     'included_units': 5
+                     # 'included_units': 5
-                 }
+                 # }
-             ],
+             # ],
-             'due_days': 10,
+             # 'due_days': 10,
-             'generate_after': 86400
+             # 'generate_after': 86400
-         }), content_type='application/json')
+         # }), content_type='application/json')
  
-         plan = Plan.objects.filter(name='Hydrogen')
+         # plan = Plan.objects.filter(name='Hydrogen')
-         self.assertEqual(plan.count(), 1)
+         # self.assertEqual(plan.count(), 1)
-         self.assertEqual(response.status_code, 201)
+         # self.assertEqual(response.status_code, 201)
  
Comment out the failing Plan test
## Code Before:
import json

from silver.models import Plan

from django.test.client import Client
from django.test import TestCase


class PlansSpecificationTestCase(TestCase):
    def setUp(self):
        self.client = Client()

    def test_create_plan(self):
        response = self.client.put('/api/plans', json.dumps({
            'name': 'Hydrogen',
            'interval': 'month',
            'interval_count': 1,
            'amount': 150,
            'currency': 'USD',
            'trial_period_days': 15,
            'metered_features': [
                {
                    'name': '100k PageViews',
                    'price_per_unit': 10,
                    'included_units': 5
                }
            ],
            'due_days': 10,
            'generate_after': 86400
        }), content_type='application/json')

        plan = Plan.objects.filter(name='Hydrogen')
        self.assertEqual(plan.count(), 1)
        self.assertEqual(response.status_code, 201)

## Instruction:
Comment out the failing Plan test
## Code After:
import json

from silver.models import Plan

from django.test.client import Client
from django.test import TestCase


class PlansSpecificationTestCase(TestCase):
    def setUp(self):
        self.client = Client()

    def test_create_plan(self):
        assert True
        # response = self.client.put('/api/plans', json.dumps({
            # 'name': 'Hydrogen',
            # 'interval': 'month',
            # 'interval_count': 1,
            # 'amount': 150,
            # 'currency': 'USD',
            # 'trial_period_days': 15,
            # 'metered_features': [
                # {
                    # 'name': '100k PageViews',
                    # 'price_per_unit': 10,
                    # 'included_units': 5
                # }
            # ],
            # 'due_days': 10,
            # 'generate_after': 86400
        # }), content_type='application/json')

        # plan = Plan.objects.filter(name='Hydrogen')
        # self.assertEqual(plan.count(), 1)
        # self.assertEqual(response.status_code, 201)
