Pushjet-Server-Api icon indicating copy to clipboard operation
Pushjet-Server-Api copied to clipboard

postgresql support - only one test failed

Open SledgehammerPL opened this issue 9 years ago • 2 comments

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.

SledgehammerPL avatar Nov 01 '16 21:11 SledgehammerPL

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.

SledgehammerPL avatar Nov 24 '16 11:11 SledgehammerPL

Let me have a look at the test

Mechazawa avatar Nov 24 '16 12:11 Mechazawa