# Path: amon/apps/map/models.py
# class MapModel(BaseModel):
#     def __init__(self):
#     def _get_device_stats(self, value=None, data=None):
#     def group_by(self, group_id=None, data=None):
#     def sort_by(self, field=None):
#     def get_fields(self):


import unittest
from time import time
from amon.apps.servers.models import server_model
from amon.apps.map.models import map_model
from amon.apps.devices.models import interfaces_model, volumes_model
from amon.apps.processes.models import process_model
from amon.apps.system.models import system_model
from amon.apps.tags.models import tags_model, tag_groups_model

now = int(time())
minute_ago = (now - 60)
two_minutes_ago = (now - 120)
five_minutes_ago = (now - 300)


class MapModelTest(unittest.TestCase):

    def setUp(self):
        pass

    def _cleanup(self):
        server_model.collection.remove()
        system_model.data_collection.remove()
        process_model.data_collection.remove()
        process_model.collection.remove()

        interfaces_model.collection.remove()
        interfaces_model.get_data_collection().remove()

        volumes_model.collection.remove()
        volumes_model.get_data_collection().remove()
        tags_model.collection.remove()


    def get_fields_test(self):
        self._cleanup()
        

# Path: amon/apps/map/models.py
# class MapModel(BaseModel):
#     def __init__(self):
#     def _get_device_stats(self, value=None, data=None):
#     def group_by(self, group_id=None, data=None):
#     def sort_by(self, field=None):
#     def get_fields(self):


# Path: amon/apps/map/tests/models_test.py
import unittest
from time import time
from amon.apps.servers.models import server_model
from amon.apps.map.models import map_model
from amon.apps.devices.models import interfaces_model, volumes_model
from amon.apps.processes.models import process_model
from amon.apps.system.models import system_model
from amon.apps.tags.models import tags_model, tag_groups_model


now = int(time())
minute_ago = (now - 60)
two_minutes_ago = (now - 120)
five_minutes_ago = (now - 300)


class MapModelTest(unittest.TestCase):

    def setUp(self):
        pass

    def _cleanup(self):
        server_model.collection.remove()
        system_model.data_collection.remove()
        process_model.data_collection.remove()
        process_model.collection.remove()

        interfaces_model.collection.remove()
        interfaces_model.get_data_collection().remove()

        volumes_model.collection.remove()
        volumes_model.get_data_collection().remove()
        tags_model.collection.remove()


    def get_fields_test(self):
        self._cleanup()
        

        result = map_model.get_fields()