def test_extract_selector_use_name_if_noselector(self): s = 'Sensor1 more:stuff,here' exp = ('Sensor1 more:stuff,here', 'name') r = utils.extract_selector(s) self.assertEquals(r, exp)
def test_extract_selector(self): s = 'id:1 more:stuff,here' exp = ('1 more:stuff,here', 'id') self.assertEquals(utils.extract_selector(s), exp)