Skip to content
This repository was archived by the owner on Sep 8, 2023. It is now read-only.

Commit b57a5e6

Browse files
committed
Added group tests
1 parent bd28534 commit b57a5e6

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

tests/test_group.py

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Copyright 2015 MarkLogic Corporation
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0#
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# File History
18+
# ------------
19+
#
20+
# Paul Hoehne 03/26/2015 Initial development
21+
# Norman Walsh 05/02/2018 Adapted from test_host.py
22+
#
23+
24+
from mlconfig import MLConfig
25+
from marklogic.models.group import Group
26+
27+
class TestGroup(MLConfig):
28+
def group_list(self):
29+
return Group.list(self.connection)
30+
31+
def test_list_groups(self):
32+
groups = self.group_list()
33+
assert len(groups) > 0
34+
assert groups
35+
36+
def test_load(self):
37+
group_name = self.group_list()[0]
38+
group = Group(group_name)
39+
assert group.read(self.connection) is not None
40+
assert group.host_timeout() > 0
41+

0 commit comments

Comments
 (0)