test api, fixed model type #6

Merged
merged 2 commits into from May 9, 2013

Conversation

Projects
None yet
2 participants
Contributor

wmatyskiewicz commented May 9, 2013

No description provided.

deshipu was assigned May 9, 2013

@deshipu deshipu commented on an outdated diff May 9, 2013

src/ralph_assets/models_assets.py
deprecation_date = self.invoice_date + relativedelta(
months=self.support_period
)
- return deprecation_date < datetime.today()
-
+ if isinstance(deprecation_date, datetime.datetime):
+ deprecation_date = deprecation_date.date()
+ return deprecation_date < datetime.datetime.today().date()
@deshipu

deshipu May 9, 2013

Contributor

use datetime.date.today() ?

@deshipu deshipu commented on an outdated diff May 9, 2013

src/ralph_assets/tests/unit/tests_models.py
from django.test import TestCase
-from ralph_assets.models_assets import Asset
-from ralph_assets.tests.util import (
- create_asset,
- create_category,
- create_model,
- create_warehouse,
- create_manufacturer,
+from ralph.business.models import Venture
+from ralph.discovery.models import (
+ Device,
+ DeviceType,
)
@deshipu

deshipu May 9, 2013

Contributor

This fits on a single line.

deshipu merged commit 8a422d6 into allegro:master May 9, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment