def test_create_twice(self, internal_client, clean_db):

        _, r = internal_client.create_tenant('foobar')
        assert r.status_code == 201

        # creating once more should not fail
        _, r = internal_client.create_tenant('foobar')
        assert r.status_code == 201
    def test_create_ok(self, internal_client, clean_db):

        _, r = internal_client.create_tenant('foobar')
        assert r.status_code == 201

        assert 'inventory-foobar' in clean_db.database_names()
        assert 'migration_info' in clean_db['inventory-foobar'].collection_names()
Exemple #3
0
    def test_create_ok(self, internal_client, clean_db):

        _, r = internal_client.create_tenant("foobar")
        assert r.status_code == 201

        assert "inventory-foobar" in clean_db.database_names()
        assert "migration_info" in clean_db[
            "inventory-foobar"].collection_names()
 def test_create_empty(self, internal_client):
     try:
         _, r = internal_client.create_tenant('')
     except bravado.exception.HTTPError as e:
         assert e.response.status_code == 400