Exemplo n.º 1
0
    def test_le(self):
        version_old = date.DateVersion(created_on=datetime.now())
        version_new = date.DateVersion(created_on=datetime.now())

        self.assertTrue(version_old <= version_new)
        self.assertTrue(version_old <= version_old)
        self.assertFalse(version_new <= version_old)
Exemplo n.º 2
0
    def test_missing_date_other(self):
        version_no_date = date.DateVersion()
        version_date = date.DateVersion(created_on=datetime.now())

        self.assertFalse(version_date < version_no_date)
Exemplo n.º 3
0
    def test_older(self):
        version_old = date.DateVersion(created_on=datetime.now())
        version_new = date.DateVersion(created_on=datetime.now())

        self.assertFalse(version_new < version_old)
Exemplo n.º 4
0
    def test_newer(self):
        version_old = date.DateVersion(created_on=datetime.now())
        version_new = date.DateVersion(created_on=datetime.now())

        self.assertTrue(version_old < version_new)
Exemplo n.º 5
0
    def test_eq_value_missing(self):
        version_date = date.DateVersion(created_on=datetime.now())
        version_no_date = date.DateVersion()

        self.assertFalse(version_date == version_no_date)
Exemplo n.º 6
0
    def test_eq_equal(self):
        version_date = date.DateVersion(created_on=datetime.now())

        self.assertTrue(version_date == version_date)
Exemplo n.º 7
0
    def test_eq_no_equal(self):
        version_old = date.DateVersion(created_on=datetime.now())
        version_new = date.DateVersion(created_on=datetime.now())

        self.assertFalse(version_old == version_new)