Exemple #1
0
 def test_custom_tablename(self):
     db_name = "router_%s" % uuid.uuid4()
     assert not table_exists(db_name, boto_resource=self.resource)
     create_router_table(db_name, boto_resource=self.resource)
     assert table_exists(db_name, boto_resource=self.resource)
     # Clean up the temp table.
     _drop_table(db_name, boto_resource=self.resource)
Exemple #2
0
    def test_message_rotate_table_with_date(self):
        prefix = "message" + uuid.uuid4().hex
        future = (datetime.today() + timedelta(days=32)).date()
        tbl_name = make_rotating_tablename(prefix, date=future)

        m = get_rotating_message_table(prefix=prefix, date=future)
        assert m.table_name == tbl_name
        # Clean up the temp table.
        _drop_table(tbl_name)