'Data containing a single incorrect data type should return errors.'

def test_invalid_single_datatype(self):

    data = 123
    serializer = self.BookSerializer(data=data, many=True)
    assert (serializer.is_valid() is False)
    expected_errors = {u'non_field_errors': [u'Expected    a    list    of    items    but    got    type    "int".']}
    assert (serializer.errors == expected_errors)
