# Path: advertisements/models.py
# class Provider(models.Model):
# class AdvertisementPanel(models.Model):
# class Advertisement(models.Model):
# class Click(models.Model):
#     def __unicode__(self):
#     def active_ads(self):
#     def active_ads_list(self):
#     def inactive_ads(self):
#     def total_clicks(self):
#     def get_absolute_url(self):
# def get_file_path(instance, filename):
#     def ad_display_num(self):
#     def total_width(self):
#     def total_height(self):
#     def get_adverts(self):
#     def get_absolute_url(self):
#     def get_iframe_url(self):
#     def __unicode__(self):
#     def __unicode__(self):
#     def clicked(self):
#     def click_history(self, history_days=10):
#     def get_absolute_url(self):
#     def get_signed_link(self):
#     def total_clicks(self):
#     ACTIVE = 'a'
#     INACTIVE = 'i'
#     PENDING = 'p'
#     STATUS_CHOICES = (
#         (ACTIVE, 'Active'),
#         (INACTIVE, 'Inactive'),
#         (PENDING, 'Pending'),
#     )


from django.test import TestCase
from advertisements.models import User, Provider, Advertisement
from model_mommy import mommy


class ProviderCountMethodTests(TestCase):
    def setUp(self):
        self.user = User.objects.create_user('admin', 'test@example.com', 'pass')
        self.user.is_superuser = True
        self.user.is_staff = True
        self.user.save()

        self.provider = Provider(
            name='provider',
            user=self.user,
        )
        self.provider.save()

        self.provider_active_adverts = mommy.make(
            Advertisement, _quantity=20,
            provider=self.provider,
            status=Advertisement.ACTIVE
        )
        self.provider_inactive_adverts = mommy.make(

# Path: advertisements/models.py
# class Provider(models.Model):
# class AdvertisementPanel(models.Model):
# class Advertisement(models.Model):
# class Click(models.Model):
#     def __unicode__(self):
#     def active_ads(self):
#     def active_ads_list(self):
#     def inactive_ads(self):
#     def total_clicks(self):
#     def get_absolute_url(self):
# def get_file_path(instance, filename):
#     def ad_display_num(self):
#     def total_width(self):
#     def total_height(self):
#     def get_adverts(self):
#     def get_absolute_url(self):
#     def get_iframe_url(self):
#     def __unicode__(self):
#     def __unicode__(self):
#     def clicked(self):
#     def click_history(self, history_days=10):
#     def get_absolute_url(self):
#     def get_signed_link(self):
#     def total_clicks(self):
#     ACTIVE = 'a'
#     INACTIVE = 'i'
#     PENDING = 'p'
#     STATUS_CHOICES = (
#         (ACTIVE, 'Active'),
#         (INACTIVE, 'Inactive'),
#         (PENDING, 'Pending'),
#     )


# Path: advertisements/tests/test_methods.py
from django.test import TestCase
from advertisements.models import User, Provider, Advertisement
from model_mommy import mommy



class ProviderCountMethodTests(TestCase):
    def setUp(self):
        self.user = User.objects.create_user('admin', 'test@example.com', 'pass')
        self.user.is_superuser = True
        self.user.is_staff = True
        self.user.save()

        self.provider = Provider(
            name='provider',
            user=self.user,
        )
        self.provider.save()

        self.provider_active_adverts = mommy.make(
            Advertisement, _quantity=20,
            provider=self.provider,
            status=Advertisement.ACTIVE
        )
        self.provider_inactive_adverts = mommy.make(

            Advertisement, _quantity=20,