Pushjet-Server-Api
Pushjet-Server-Api copied to clipboard
postgresql support - only one test failed
I adapted database.py for postgresql, and only one test failed:
$python2 tests.py
...F......................
======================================================================
FAIL: test_gcm_unregister (__main__.PushjetTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests.py", line 251, in test_gcm_unregister
self._failing_loader(rv)
File "tests.py", line 48, in _failing_loader
raise AssertionError("Got an unexpected error, [{}] {}".format(err['id'], err['message']))
AssertionError: Got an unexpected error, [7] Missing argument uuid
----------------------------------------------------------------------
Ran 26 tests in 8.315s
FAILED (failures=1)
I don't know sqlalchemy at all, so can't make automagic choosing in application.py - so I have to add the line in application.py - but if there's a way to check if db.engine is mysql or pgsql - it should be done.
I fixed gcm - now it works with fcm. It could be done better, but I don't know if you want replace GCM or add FCM support.
Let me have a look at the test