Ejemplo n.º 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)
Ejemplo n.º 2
0
    def test_custom_tablename(self):
        db = DynamoDBConnection()
        db_name = "router_%s" % uuid.uuid4()
        dblist = db.list_tables()["TableNames"]
        assert db_name not in dblist

        create_router_table(db_name)
        dblist = db.list_tables()["TableNames"]
        assert db_name in dblist
Ejemplo n.º 3
0
    def test_custom_tablename(self):
        db = DynamoDBConnection()
        db_name = "router_%s" % uuid.uuid4()
        dblist = db.list_tables()["TableNames"]
        assert db_name not in dblist

        create_router_table(db_name)
        dblist = db.list_tables()["TableNames"]
        assert db_name in dblist
Ejemplo n.º 4
0
    def test_provisioning(self):
        db_name = "router_%s" % uuid.uuid4()

        r = create_router_table(db_name, 3, 17,
                                boto_resource=self.resource)
        assert r.provisioned_throughput.get('ReadCapacityUnits') == 3
        assert r.provisioned_throughput.get('WriteCapacityUnits') == 17
Ejemplo n.º 5
0
    def test_provisioning(self):
        db_name = "router_%s" % uuid.uuid4()

        r = create_router_table(db_name, 3, 17)
        assert r.throughput["read"] == 3
        assert r.throughput["write"] == 17
Ejemplo n.º 6
0
    def test_provisioning(self):
        db_name = "router_%s" % uuid.uuid4()

        r = create_router_table(db_name, 3, 17)
        assert r.throughput["read"] == 3
        assert r.throughput["write"] == 17
Ejemplo n.º 7
0
    def test_provisioning(self):
        db_name = "router_%s" % uuid.uuid4()

        r = create_router_table(db_name, 3, 17)
        eq_(r.throughput["read"], 3)
        eq_(r.throughput["write"], 17)