Example #1
0
    def test_up_to_date0001(self):
        """The database has been created by setup_method and is now up to date.
        re-initialising the db should not be necessary."""

        create, update = check_sqldb(self.cfg)
        assert not create
        assert not update
Example #2
0
    def test_ood0001(self):
        """Out of date. Update is necessary"""

        os.utime(self.cfg.tlpdb, None)   # aka. touch

        create, update = check_sqldb(self.cfg)
        assert not create
        assert update
Example #3
0
    def test_non_existent0001(self):
        """We remove the database. Creation should be necessary."""

        self.sess.close()
        os.unlink(self.cfg.sqldb)

        create, update = check_sqldb(self.cfg)
        assert create
        assert not update