mirror of
https://github.com/onyx-and-iris/obsws-python.git
synced 2026-04-18 14:03:32 +00:00
added test_attrs
added tests to test_request keys in attrs() list now snake cased
This commit is contained in:
@@ -8,7 +8,7 @@ import tomllib
|
||||
import websocket
|
||||
|
||||
|
||||
class ObsClient(object):
|
||||
class ObsClient:
|
||||
DELAY = 0.001
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
|
||||
@@ -19,7 +19,7 @@ Subs = IntEnum(
|
||||
)
|
||||
|
||||
|
||||
class EventClient(object):
|
||||
class EventClient:
|
||||
DELAY = 0.001
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
|
||||
@@ -9,7 +9,7 @@ https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.
|
||||
"""
|
||||
|
||||
|
||||
class ReqClient(object):
|
||||
class ReqClient:
|
||||
def __init__(self, **kwargs):
|
||||
self.base_client = ObsClient(**kwargs)
|
||||
self.base_client.authenticate()
|
||||
|
||||
@@ -12,7 +12,7 @@ def to_snake_case(s):
|
||||
|
||||
def as_dataclass(identifier, data):
|
||||
def attrs():
|
||||
return list(data.keys())
|
||||
return list(to_snake_case(k) for k in data.keys())
|
||||
|
||||
return dataclass(
|
||||
type(
|
||||
|
||||
Reference in New Issue
Block a user