# Path: tests/testapp/models.py
# class TimeSeries(models.Model):
#     date = models.DateField()
#     value = models.FloatField()
# 
#     objects = DataFrameManager()
# 
# class CustomIndexSeries(models.Model):
#     code = models.SlugField(primary_key=True)
#     value = models.FloatField()
# 
# Path: tests/settings.py
# HAS_DJANGO_PANDAS = False


import unittest
import json
import datetime
import os
from rest_framework.test import APITestCase
from tests.testapp.models import TimeSeries, CustomIndexSeries
from wq.io import load_string
from .settings import HAS_DJANGO_PANDAS


class PandasTestCase(APITestCase):
    def setUp(self):
        data = (
            ('2014-01-01', 0.5),
            ('2014-01-02', 0.4),
            ('2014-01-03', 0.6),
            ('2014-01-04', 0.2),
            ('2014-01-05', 0.1),
        )
        for date, value in data:

# Path: tests/testapp/models.py
# class TimeSeries(models.Model):
#     date = models.DateField()
#     value = models.FloatField()
# 
#     objects = DataFrameManager()
# 
# class CustomIndexSeries(models.Model):
#     code = models.SlugField(primary_key=True)
#     value = models.FloatField()
# 
# Path: tests/settings.py
# HAS_DJANGO_PANDAS = False


# Path: tests/test_views.py
import unittest
import json
import datetime
import os
from rest_framework.test import APITestCase
from tests.testapp.models import TimeSeries, CustomIndexSeries
from wq.io import load_string
from .settings import HAS_DJANGO_PANDAS



class PandasTestCase(APITestCase):
    def setUp(self):
        data = (
            ('2014-01-01', 0.5),
            ('2014-01-02', 0.4),
            ('2014-01-03', 0.6),
            ('2014-01-04', 0.2),
            ('2014-01-05', 0.1),
        )
        for date, value in data:

            TimeSeries.objects.create(date=date, value=value)