# Path: amivapi/settings.py
# DATE_FORMAT = "%Y-%m-%dT%H:%M:%SZ"
# 
# Path: amivapi/tests/utils.py
# class TestClient(FlaskClient):
# class TestResponse(Response):
# class WebTest(unittest.TestCase, FixtureMixin):
# class WebTestNoAuth(WebTest):
#     def open(self, *args, **kwargs):
#     def json(self):
#     def setUp(self, **extra_config):
#     def tearDown(self):
#     def get_user_token(self, user_id, created=None):
#     def get_root_token(self):
#     def setUp(self, **extra_config):
#         def authenticate_root(resource):
# def skip_if_false(condition, reason):
#     def _skip(func):


from datetime import datetime, timedelta
from io import BytesIO
from os.path import dirname, join
from amivapi.settings import DATE_FORMAT
from amivapi.tests import utils
        expired_time = datetime.utcnow() - timedelta(days=1)

        self.new_object(
            'joboffers',
            company='ACME Inc.',
            title_en="ACME Wants engineers",
            description_en="ACME needs your life",
            time_end=expired_time
        )

        p = self.api.get(
            '/joboffers?where={"time_end": {"$gte": "%s"}}'
            % datetime.utcnow().strftime(DATE_FORMAT),
            status_code=200).json['_items']
        self.assertEqual(len(p), 0)

        # Next we test fetching a valid job offer
        # Should return the fresh job offer which is still valid
        valid_time = (datetime.utcnow() + timedelta(days=1))

        self.new_object(
            'joboffers',
            company='AMIV Inc.',
            title_en="ACME wants more engineers",
            description_en="ACME need you life",
            time_end=valid_time
        )

        p = self.api.get(
            '/joboffers?where={"time_end" : {"$gte": "%s"}}'

# Path: amivapi/settings.py
# DATE_FORMAT = "%Y-%m-%dT%H:%M:%SZ"
# 
# Path: amivapi/tests/utils.py
# class TestClient(FlaskClient):
# class TestResponse(Response):
# class WebTest(unittest.TestCase, FixtureMixin):
# class WebTestNoAuth(WebTest):
#     def open(self, *args, **kwargs):
#     def json(self):
#     def setUp(self, **extra_config):
#     def tearDown(self):
#     def get_user_token(self, user_id, created=None):
#     def get_root_token(self):
#     def setUp(self, **extra_config):
#         def authenticate_root(resource):
# def skip_if_false(condition, reason):
#     def _skip(func):


# Path: amivapi/tests/joboffers/test_joboffers.py
from datetime import datetime, timedelta
from io import BytesIO
from os.path import dirname, join
from amivapi.settings import DATE_FORMAT
from amivapi.tests import utils

        expired_time = datetime.utcnow() - timedelta(days=1)

        self.new_object(
            'joboffers',
            company='ACME Inc.',
            title_en="ACME Wants engineers",
            description_en="ACME needs your life",
            time_end=expired_time
        )

        p = self.api.get(
            '/joboffers?where={"time_end": {"$gte": "%s"}}'
            % datetime.utcnow().strftime(DATE_FORMAT),
            status_code=200).json['_items']
        self.assertEqual(len(p), 0)

        # Next we test fetching a valid job offer
        # Should return the fresh job offer which is still valid
        valid_time = (datetime.utcnow() + timedelta(days=1))

        self.new_object(
            'joboffers',
            company='AMIV Inc.',
            title_en="ACME wants more engineers",
            description_en="ACME need you life",
            time_end=valid_time
        )

        p = self.api.get(
            '/joboffers?where={"time_end" : {"$gte": "%s"}}'

            % datetime.utcnow().strftime(DATE_FORMAT),