FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python-server-sdk/testing/impl/test_model_encoder.py at main · cadencerpm/python-server-sdk · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
cadencerpm
/
python-server-sdk
Public
forked from
launchdarkly/python-server-sdk
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
python-server-sdk
/
testing
/
impl
/
test_model_encoder.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
17 lines (11 loc) · 403 Bytes
Breadcrumbs
python-server-sdk
/
testing
/
impl
/
test_model_encoder.py
Copy path
File metadata and controls
17 lines (11 loc) · 403 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from
ldclient
.
impl
.
model
import
*
import
json
class
MyTestEntity
(
ModelEntity
):
def
__init__
(
self
,
value
):
self
.
_value
=
value
def
to_json_dict
(
self
)
->
dict
:
return
{
'magicValue'
:
self
.
_value
}
def
test_model_encoder
():
data
=
[
MyTestEntity
(
1
),
MyTestEntity
(
'x'
)]
output
=
ModelEncoder
().
encode
(
data
)
assert
output
==
'[{"magicValue":1},{"magicValue":"x"}]'
Back
|
FazBrowse Home
|
New Git URL