Ejemplo n.º 1
0
    def test_marshal_dataset_not_owner(self, mock_conn, owner_permissions):
        row = [
            rlong(1L),
            rstring('name'),
            rlong(2L),
            owner_permissions,
            rlong(1L)
        ]
        expected = {
            'id': 1L,
            'name': 'name',
            'permsCss': 'canEdit canAnnotate canLink canDelete',
            'childCount': 1
        }

        marshaled = marshal_dataset(mock_conn, row)
        assert marshaled == expected
Ejemplo n.º 2
0
    def test_marshal_dataset_not_owner(self, mock_conn, owner_permissions):
        row = [
            rlong(1L),
            rstring('name'),
            rlong(2L),
            owner_permissions,
            rlong(1L)
        ]
        expected = {
            'id': 1L,
            'isOwned': False,
            'name': 'name',
            'permsCss': 'canEdit canAnnotate canLink canDelete',
            'childCount': 1
        }

        marshaled = marshal_dataset(mock_conn, row)
        assert marshaled == expected