2020-06-21 19:53:18 -04:00
|
|
|
from unittest import TestCase
|
|
|
|
|
|
|
|
from lbry.db.query_context import Event
|
|
|
|
|
|
|
|
|
|
|
|
class TestDBEvents(TestCase):
|
|
|
|
|
|
|
|
def test_enum(self):
|
2020-08-20 13:31:58 -04:00
|
|
|
self.assertEqual(Event.get_by_id(1).name, "client.sync.claims.insert")
|
|
|
|
self.assertEqual(Event.get_by_name("client.sync.claims.insert").id, 1)
|