def test_file_has_content_equal_not_binary(self):
    data = u'Mary had a little lamb, its fleece as white as snoщ'
    ref = data
    with mock.patch('ironic.common.utils.open', mock.mock_open(read_data=data)) as mopen:
        self.assertTrue(utils.file_has_content('foo', ref))
        mopen.assert_called_once_with('foo', 'rb')
def test_file_has_content_equal_not_binary(self):
    data = u'Mary had a little lamb, its fleece as white as snoщ'
    ref = data
    with mock.patch('ironic.common.utils.open', mock.mock_open(read_data=data)) as mopen:
        self.assertTrue(utils.file_has_content('foo', ref))
        mopen.assert_called_once_with('foo', 'rb')