예제 #1
0
    def test_remote_is_none(self):
        self.model2.timestamp = None

        ret = DistSync.existing_distribution_is_current(
            self.model1, self.model2)

        self.assertTrue(ret is False)
예제 #2
0
    def test_not_current(self):
        self.model1.timestamp = 600.0  # 10 mins after the epoch

        ret = DistSync.existing_distribution_is_current(
            self.model1, self.model2)

        self.assertTrue(ret is False)
예제 #3
0
    def test_remote_is_none(self):
        self.model2.timestamp = None

        ret = DistSync.existing_distribution_is_current(self.model1, self.model2)

        self.assertTrue(ret is False)
예제 #4
0
    def test_not_current(self):
        self.model1.timestamp = 600.0  # 10 mins after the epoch

        ret = DistSync.existing_distribution_is_current(self.model1, self.model2)

        self.assertTrue(ret is False)
예제 #5
0
 def test_current(self):
     ret = DistSync.existing_distribution_is_current(self.model1, self.model2)
     self.assertTrue(ret is True)
예제 #6
0
 def test_current(self):
     ret = DistSync.existing_distribution_is_current(self.model1, self.model2)
     self.assertTrue(ret is True)