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)
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)
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)
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)
def test_current(self): ret = DistSync.existing_distribution_is_current(self.model1, self.model2) self.assertTrue(ret is True)