26 Commits

Author SHA1 Message Date
Noah Levitt
f347407c5b making tests work better and pass
but not in python 2.7. mock.MagicMock is not an iterator there
apparently :(
2018-09-17 13:24:59 -07:00
Noah Levitt
95c4cff838 test rethinker error handling, exposing fact that
recoverable errors that happen while iterating over results are not
caught
2018-09-17 11:58:44 -07:00
Noah Levitt
aa177f94b8 split tests into different source files 2017-03-02 10:16:41 -08:00
Noah Levitt
246dfb5b7e new orm class method table_ensure 2017-03-01 11:40:12 -08:00
Noah Levitt
c14bae6050 new convention, call Rethinker object rr (mnemonic RethinkeR, or *double*[think]), leave rethinkdb as r per the rethinkdb convention 2017-03-01 11:20:27 -08:00
Noah Levitt
536bf8d1d8 implement or explicitly disallow other top-level dict operations on ORM Document, and add more automated tests 2017-02-28 17:56:44 -08:00
Noah Levitt
e8db41763b rename the project "doublethink" (credit goes to @adam-miller) 2017-02-28 16:44:26 -08:00
Noah Levitt
4a9978fc46 make ORM __getattr___ return None if attribute is missing; documentation improvements 2017-02-28 16:42:57 -08:00
Noah Levitt
ad0e1b1fd7 rename Document.get to Document.load to avoid masking dict.get 2017-02-24 16:52:59 -08:00
Noah Levitt
abdecc46b8 better smarter ORM with more tests 2017-02-23 16:07:14 -08:00
Noah Levitt
000e4d9cf6 playing with simple ORM thing 2017-02-17 17:23:53 -08:00
Noah Levitt
9c3439dfc5 add apache license file and some license headers 2016-10-31 15:39:12 -07:00
Noah Levitt
82faefde56 catch a failed service registry heartbeat, with unit test 2016-10-31 15:29:46 -07:00
Noah Levitt
8745d5b6b7 fix tests, including adjusting the timing to make tests pass more consistently 2016-04-19 20:17:22 +00:00
Noah Levitt
f9169321a6 add some tests for available_services() 2016-04-19 19:24:33 +00:00
Noah Levitt
073c1fb578 some fixes to make the tests pass 2015-11-17 20:38:10 +00:00
Noah Levitt
447f23615f convenience function rethinstuff.utcnow() 2015-11-17 20:06:51 +00:00
Noah Levitt
287258e104 add method available_services to ServiceRegistry, returns all services considered up for the supplied role 2015-11-06 23:42:06 +00:00
Noah Levitt
a0f5c4870f add pid and first_heartbeat to service registry automatically 2015-11-02 21:20:46 +00:00
Noah Levitt
46a54357ad return whole updated status_info dict from ServiceRegistry.heartbeat() 2015-10-31 00:33:06 +00:00
Noah Levitt
5570ca9241 service registry, with unit tests! 2015-10-30 19:50:33 +00:00
Noah Levitt
24edeb3247 support array slice notation https://rethinkdb.com/api/python/slice/ 2015-09-29 22:07:50 +00:00
Noah Levitt
a377fd5305 only retry r.ReqlTimeoutError because creating a database with too many replicas or shards raises a r.ReqlAvailabilityError, which resulted in an infinite loop; add test for this case 2015-09-22 21:34:12 +00:00
Noah Levitt
c4314e6cdb remove some debug logging 2015-09-22 01:06:25 +00:00
Noah Levitt
50df439706 make sure connection closes when it's supposed to 2015-09-21 23:30:43 +00:00
Noah Levitt
aa080ce2e9 tests using docker to containerize rethinkdb fixture 2015-09-21 22:19:09 +00:00