Beispiel #1
0
    def setUp(self):
        super(HandleMoonDataTest, self).setUp()
        from node_tools import state_data as st

        self.saved_state = AttrDict.from_nested_dict(st.fpnState)
        self.default_state = AttrDict.from_nested_dict(st.defState)
        self.state = st.fpnState
        self.client = client = mock_zt_api_client()
        _, moon_data = client.get_data('moon')
        self.data = parse_moon_data(moon_data)
        self.moons = ['deadd738e6']
        NODE_SETTINGS['moon_list'] = self.moons
Beispiel #2
0
def test_parse_moon_data():
    _, moon_data = client.get_data('moon')
    result = parse_moon_data(moon_data)
    # print(result)
    assert result == [('deadd738e6', '10.0.1.66', '9993'),
                      ('beefa7b693', '192.168.0.66', '9993')]