def test_collectios_list_exclude_system(self):
        endpoint = get_endpoint()

        logger.info("Creationg three collections sample[1..3]")
        endpoint._create('sample1')
        endpoint._create('sample2')
        endpoint._create('sample3')

        logger.info("Getting list of collections")
        collections = endpoint._collections(True)

        names = ("sample1", "sample2", "sample3")
        for collection in collections:
            assert_true(collection.name in names)

        logger.info("Deleting two of three collections")
        endpoint._drop('sample1')
        endpoint._drop('sample3')

        collections = endpoint._collections(True)

        for collection in collections:
            assert_false(collection.name in ("sample1", "sample3"))

        names = ("sample2",)
        for collection in collections:
            assert_true(collection.name in names)

        logger.info("Removing last collection")
        endpoint._drop('sample2')
    def test_collection_rename(self):
        endpoint = get_endpoint()

        logger.info("Creationg new collection 'test'")
        collection = endpoint._create('test')

        endpoint.test.rename(name="test_sample")
        assert_equal(collection.name, 'test_sample')

        logger.info("Removign collection 'test_sample'")
        endpoint.test_sample.drop()
    def test_collection_creation(self):
        endpoint = get_endpoint()

        logger.info("Creationg new collection 'test'")

        created = endpoint._create('test')
        self.wait()
        assert_true(created.id is not None)

        logger.info("Deleting collection 'test'")

        assert_true(created in endpoint._collections())
        endpoint.test.drop()

        self.wait()
        assert_false(created in endpoint._collections())

        logger.info("Deleting collection 'test' with waitForSync=True")
        created = endpoint._create('test', waitForSync=True)
        assert_true(created in endpoint._collections())
        assert_true(created.waitForSync)
        endpoint.test.drop()