Beispiel #1
0
def test_to_cqrs_dict_basic_types():
    dt = now()
    uid = uuid4()
    m = models.BasicFieldsModel(
        int_field=1,
        bool_field=False,
        char_field='str',
        date_field=None,
        datetime_field=dt,
        float_field=1.23,
        url_field='http://example.com',
        uuid_field=uid,
    )
    assert_is_sub_dict(
        {
            'int_field': 1,
            'bool_field': False,
            'char_field': 'str',
            'date_field': None,
            'datetime_field': str(dt),
            'float_field': 1.23,
            'url_field': 'http://example.com',
            'uuid_field': uid,
        }, m.to_cqrs_dict())
Beispiel #2
0
def test_cqrs_sync_not_created():
    m = models.BasicFieldsModel()
    assert not m.cqrs_sync()