def these_sentences_are_returned(context, feature):
    assert_status_code_ok(context.response)
    assert_response_for_feature(map(pluck('sentence'), context.table), feature,
                                context.response)
Exemple #2
0
 def test_pluck_with_key_that_exists(self):
     self.assertEqual('Adam', pluck('name')(dict(name='Adam')))
Exemple #3
0
 def test_pluck_with_key_that_does_not_exist(self):
     self.assertRaises(KeyError, lambda: pluck('name')(dict()))
Exemple #4
0
def actual_sentences_from(response_data):
    return map(pluck('sentence'), response_data['sentences'])