pbrezina / copr / copr

Forked from copr/copr 2 years ago
Clone

84da5ba add date to data for test builds

Authored and Committed by msuchy 10 years ago
    add date to data for test builds
    
    9223372036854775807 is maximum integer value in sqlite3
    But time.gmtime takes it in millisecons so we need to divede that number by 1000.
    
    addressing:
    =================================== FAILURES ===================================
    _____ TestWaitingBuilds.test_waiting_build_only_lists_not_started_or_ended _____
    
    self = <test_backend_general.TestWaitingBuilds object at 0x496ac10>
    f_users = None, f_coprs = None, f_mock_chroots = None, f_builds = None
    f_db = None
    
        def test_waiting_build_only_lists_not_started_or_ended(
                self, f_users, f_coprs, f_mock_chroots, f_builds, f_db):
    
            r = self.tc.get('/backend/waiting/', headers=self.auth_header)
    >       assert len(json.loads(r.data)['builds']) == 4
    E       assert 5 == 4
    E        +  where 5 = len([{u'buildroot_pkgs': None, u'canceled': False, u'chroot': u'fedora-17-x86_64', u'copr': {u'id': 2, u'name': u'foocopr'... u'chroot': u'fedora-17-i386', u'copr': {u'id': 2, u'name': u'foocopr', u'owner': {u'id': 2, u'name': u'user2'}}, ...}])
    
    tests/test_views/test_backend_ns/test_backend_general.py:15: AssertionError