# Path: tsuru_autoscale/wizard/forms.py
# OPERATOR_CHOICES = (
#     ('>', '>'),
#     ('>=', '>='),
#     ('<=', '<='),
#     ('<', '<'),
#     ('!=', '!='),
# )
# AGGREGATOR_CHOICES = (
#     ('avg', 'average'),
#     ('max', 'maximum'),
# )
# class ScaleForm(forms.Form):
# class ConfigForm(forms.Form):
#     def __init__(self, min_wait, *args, **kwargs):
#     def clean_value(self):
#     def clean_step(self):
# 
# Path: tsuru_autoscale/wizard/client.py
# def host():
# def tsuru_host():
# def clean_token(token):
# def app_info(name, token):
# def pool_info(name, token):
# def process_list(instance_name, token):
# def new(data, token):
# def get(name, token):
# def remove(name, token):
# def enable(name, token):
# def disable(name, token):
# def events(name, token):


from django.test import TestCase
from django.core.urlresolvers import reverse
from django.conf import settings
from tsuru_autoscale.wizard import forms
from tsuru_autoscale.wizard import client
from importlib import import_module
import mock
import httpretty
import os
        }

        form = forms.ConfigForm()

        for field, required in fields.items():
            self.assertEqual(form.fields[field].required, required)


class IndexTestCase(TestCase):
    def setUp(self):
        settings.SESSION_ENGINE = 'django.contrib.sessions.backends.file'
        engine = import_module(settings.SESSION_ENGINE)
        store = engine.SessionStore()
        store.save()
        self.session = store
        self.client.cookies[settings.SESSION_COOKIE_NAME] = store.session_key
        self.session["tsuru_token"] = "b bla"
        self.session.save()

    @mock.patch("tsuru_autoscale.wizard.client.process_list")
    @mock.patch("tsuru_autoscale.datasource.client.list")
    def test_index(self, dlist_mock, process_mock):
        url = reverse("wizard-new", args=["instance"])
        response = self.client.get(url)
        self.assertTemplateUsed(response, "wizard/index.html")

    @mock.patch("tsuru_autoscale.wizard.client.process_list")
    @mock.patch("tsuru_autoscale.datasource.client.list")
    def test_forms_prefix(self, dlist_mock, process_mock):
        url = reverse("wizard-new", args=["instance"])

# Path: tsuru_autoscale/wizard/forms.py
# OPERATOR_CHOICES = (
#     ('>', '>'),
#     ('>=', '>='),
#     ('<=', '<='),
#     ('<', '<'),
#     ('!=', '!='),
# )
# AGGREGATOR_CHOICES = (
#     ('avg', 'average'),
#     ('max', 'maximum'),
# )
# class ScaleForm(forms.Form):
# class ConfigForm(forms.Form):
#     def __init__(self, min_wait, *args, **kwargs):
#     def clean_value(self):
#     def clean_step(self):
# 
# Path: tsuru_autoscale/wizard/client.py
# def host():
# def tsuru_host():
# def clean_token(token):
# def app_info(name, token):
# def pool_info(name, token):
# def process_list(instance_name, token):
# def new(data, token):
# def get(name, token):
# def remove(name, token):
# def enable(name, token):
# def disable(name, token):
# def events(name, token):


# Path: tsuru_autoscale/wizard/tests.py
from django.test import TestCase
from django.core.urlresolvers import reverse
from django.conf import settings
from tsuru_autoscale.wizard import forms
from tsuru_autoscale.wizard import client
from importlib import import_module
import mock
import httpretty
import os

        }

        form = forms.ConfigForm()

        for field, required in fields.items():
            self.assertEqual(form.fields[field].required, required)


class IndexTestCase(TestCase):
    def setUp(self):
        settings.SESSION_ENGINE = 'django.contrib.sessions.backends.file'
        engine = import_module(settings.SESSION_ENGINE)
        store = engine.SessionStore()
        store.save()
        self.session = store
        self.client.cookies[settings.SESSION_COOKIE_NAME] = store.session_key
        self.session["tsuru_token"] = "b bla"
        self.session.save()

    @mock.patch("tsuru_autoscale.wizard.client.process_list")
    @mock.patch("tsuru_autoscale.datasource.client.list")
    def test_index(self, dlist_mock, process_mock):
        url = reverse("wizard-new", args=["instance"])
        response = self.client.get(url)
        self.assertTemplateUsed(response, "wizard/index.html")

    @mock.patch("tsuru_autoscale.wizard.client.process_list")
    @mock.patch("tsuru_autoscale.datasource.client.list")
    def test_forms_prefix(self, dlist_mock, process_mock):
        url = reverse("wizard-new", args=["instance"])

        response = self.client.get(url)