Code Duplication    Length = 13-14 lines in 2 locations

tests/test_config.py 2 locations

@@ 65-78 (lines=14) @@
62
                      serializer.GraphSONMessageSerializer)
63
64
65
def test_cluster_config_from_json(event_loop, cluster_class):
66
    cluster = cluster_class(event_loop)
67
    cluster.config_from_file(dirname + '/tests/config/config.json')
68
    assert cluster.config['scheme'] == 'wss'
69
    assert cluster.config['hosts'] == ['localhost']
70
    assert cluster.config['port'] == 8182
71
    assert cluster.config['ssl_certfile'] == ''
72
    assert cluster.config['ssl_keyfile'] == ''
73
    assert cluster.config['ssl_password'] == ''
74
    assert cluster.config['username'] == 'dave'
75
    assert cluster.config['password'] == 'mypass'
76
77
    assert issubclass(cluster.config['message_serializer'],
78
                      serializer.GraphSONMessageSerializer)
79
80
81
def test_cluster_config_from_yaml(event_loop, cluster_class):
@@ 81-93 (lines=13) @@
78
                      serializer.GraphSONMessageSerializer)
79
80
81
def test_cluster_config_from_yaml(event_loop, cluster_class):
82
    cluster = cluster_class(event_loop, host='gremlin-server')
83
    cluster.config_from_file(dirname + '/tests/config/config.yml')
84
    assert cluster.config['scheme'] == 'wss'
85
    assert cluster.config['hosts'] == ['localhost']
86
    assert cluster.config['port'] == 8183
87
    assert cluster.config['ssl_certfile'] == ''
88
    assert cluster.config['ssl_keyfile'] == ''
89
    assert cluster.config['ssl_password'] == ''
90
    assert cluster.config['username'] == ''
91
    assert cluster.config['password'] == ''
92
    assert issubclass(cluster.config['message_serializer'],
93
                      serializer.GraphSONMessageSerializer)
94
95
96
def test_cluster_config_from_module(event_loop, cluster_class, conf_module):