def testBuildDataNeedUpdating(self):
        build = WfBuild.Create('m', 'b', 1)

        # Build data is not available.
        self.assertTrue(build_util._BuildDataNeedUpdating(build))

        # Build was not completed and data is not recent.
        build.data = 'dummy'
        build.completed = False
        build.last_crawled_time = self._TimeBeforeNowBySeconds(360)
        self.assertTrue(build_util._BuildDataNeedUpdating(build))
示例#2
0
  def testBuildDataNeedUpdating(self):
    build = WfBuild.Create('m', 'b', 1)

    # Build data is not available.
    self.assertTrue(build_util._BuildDataNeedUpdating(build))

    # Build was not completed and data is not recent.
    build.data = 'dummy'
    build.completed = False
    build.last_crawled_time = self._TimeBeforeNowBySeconds(360)
    self.assertTrue(build_util._BuildDataNeedUpdating(build))
    def testBuildDataNotNeedUpdating(self):
        build = WfBuild.Create('m', 'b', 1)

        # Build is not completed yet but data is recent.
        build.data = 'dummy'
        build.completed = False
        build.last_crawled_time = self._TimeBeforeNowBySeconds(60)
        self.assertFalse(build_util._BuildDataNeedUpdating(build))

        # Build was completed and data is final.
        build.data = 'dummy'
        build.completed = True
        build.last_crawled_time = self._TimeBeforeNowBySeconds(360)
        self.assertFalse(build_util._BuildDataNeedUpdating(build))
示例#4
0
  def testBuildDataNotNeedUpdating(self):
    build = WfBuild.Create('m', 'b', 1)

    # Build is not completed yet but data is recent.
    build.data = 'dummy'
    build.completed = False
    build.last_crawled_time = self._TimeBeforeNowBySeconds(60)
    self.assertFalse(build_util._BuildDataNeedUpdating(build))

    # Build was completed and data is final.
    build.data = 'dummy'
    build.completed = True
    build.last_crawled_time = self._TimeBeforeNowBySeconds(360)
    self.assertFalse(build_util._BuildDataNeedUpdating(build))