@@ -12,7 +12,6 @@ and databases.
1212* [ MongoDB] ( #mongodb )
1313* [ Postgres] ( #postgres )
1414* [ Redis] ( #redis )
15- * [ RethinkDB] ( #rethinkdb )
1615* [ S3 Minio] ( #s3-minio )
1716* [ Apache httpd] ( #apache-httpd )
1817* [ Simple HTTP Server] ( #simple-http-server )
@@ -30,7 +29,6 @@ and databases.
3029| MongoDB | mongodb
3130| Postgres | postgres
3231| Redis | redis
33- | RethinkDB | rethinkdb
3432| S3 Minio | s3
3533| Apache Httpd | <none >
3634| Simple HTTP Server | <none >
@@ -74,7 +72,6 @@ entry points):
7472 ' pytest_server_fixtures.mongo' ,
7573 ' pytest_server_fixtures.postgres' ,
7674 ' pytest_server_fixtures.redis' ,
77- ' pytest_server_fixtures.rethink' ,
7875 ' pytest_server_fixtures.xvfb' ,
7976 ]
8077```
@@ -95,8 +92,6 @@ The fixtures are configured using the following evironment variables:
9592| ` SERVER_FIXTURES_PG_CONFIG ` | Postgres pg_config executable | ` pg_config `
9693| ` SERVER_FIXTURES_REDIS ` | Redis server executable | ` redis-server `
9794| ` SERVER_FIXTURES_REDIS_IMAGE ` | (Docker only) Docker image for redis | ` redis:5.0.2-alpine `
98- | ` SERVER_FIXTURES_RETHINK ` | RethinkDB server executable | ` rethinkdb `
99- | ` SERVER_FIXTURES_RETHINK_IMAGE ` | (Docker only) Docker image for rethinkdb | ` rethink:2.3.6 `
10095| ` SERVER_FIXTURES_HTTPD ` | Httpd server executable | ` apache2 `
10196| ` SERVER_FIXTURES_HTTPD_MODULES ` | Httpd modules directory | ` /usr/lib/apache2/modules `
10297| ` SERVER_FIXTURES_JAVA ` | Java executable used for running Jenkins server | ` java `
@@ -226,72 +221,6 @@ def test_connection(s3_bucket):
226221 assert bucket is not None
227222```
228223
229- ## RethinkDB
230-
231-
232- The ` rethink ` module contains the following fixtures:
233-
234- | Fixture Name | Description
235- | ------------ | -----------
236- | ` rethink_server ` | Function-scoped Redis server
237- | ` rethink_server_sess ` | Session-scoped Redis server
238- | ` rethink_unique_db ` | Session-scoped unique db
239- | ` rethink_module_db ` | Module-scoped unique db
240- | ` rethink_make_tables ` | Module-scoped fixture to create named tables
241- | ` rethink_empty_db ` | Function-scoped fixture to empty tables created in ` rethink_make_tables `
242-
243- The server fixtures have the following properties
244-
245- | Property | Description
246- | -------- | -----------
247- | ` conn ` | ` rethinkdb.Connection ` to the ` test ` database on the running server
248-
249-
250- Here's an example on how to run up one of these servers:
251-
252- ``` python
253- def test_rethink (rethink_server ):
254- conn = rethink_server.conn
255- conn.table_create(' my_table' ).run(conn)
256- inserted = conn.table(' my_table' ).insert({' foo' : ' bar' }).run(conn)
257- assert conn.get(inserted.generated_keys[0 ])[' foo' ] == ' bar
258- ```
259-
260- ### Creating Tables
261-
262- You can create tables for every test in your module like so:
263-
264- ``` python
265- FIXTURE_TABLES = [' accounts' ,' transactions' ]
266-
267- def test_table_creation (rethink_module_db , rethink_make_tables ):
268- conn = rethink_module_db
269- assert conn.table_list().run(conn) == [' accounts' , ' transactions' ]
270- ```
271-
272- ### Emptying Databases
273-
274- RehinkDb is annecdotally slower to create tables that it is to empty them
275- (at least at time of writing), so we have a fixture that will empty out
276- tables between tests for us that were created with the ` rethink_make_tables `
277- fixture above:
278-
279-
280- ``` python
281- FIXTURE_TABLES = [' accounts' ,' transactions' ]
282-
283- def test_put_things_in_db (rethink_module_db , rethink_make_tables ):
284- conn = rethink_module_db
285- conn.table(' accounts' ).insert({' foo' : ' bar' }).run(conn)
286- conn.table(' transactions' ).insert({' baz' : ' qux' }).run(conn)
287-
288-
289- def test_empty_db (rethink_empty_db ):
290- conn = rethink_empty_db
291- assert not conn.table(' accounts' ).run(conn)
292- assert not conn.table(' transactions' ).run(conn)
293- ```
294-
295224# Apache httpd
296225
297226The ` httpd ` module contains the following fixtures:
@@ -444,7 +373,6 @@ pytest_shutil.workspace.Workspace
444373 |
445374 *--mongo.MongoTestServer
446375 *--redis.RedisTestServer
447- *--rethink.RethinkDBServer
448376 *--base.TestServer
449377 |
450378 *--http.HTTPTestServer
0 commit comments