Example #1
0
from datetime import datetime, timedelta

from nose.tools import assert_raises, eq_

from datasets import ActivityData, make_data, get_base
from tic.model import Activity

data = make_data()


def teardown():
    data.teardown()


def test_hour_duration():
    act = get_base()
    durations = [
        (
            timedelta(hours=1),
            [
                "   1 hour",
                "1 hours",
                "0 hours 60 minute ",
                "60 minutes",
                "  1  h   ",
                "1h    0m   ",
                "1h 0 minute",
                "60m",
                "0h     60m",
            ],
        )
Example #2
0
 def setUp(self):
     self.app = TestApp(application)
     self.data = make_data()
     self.act = get_base()
     self.key = self.act.key()