def test_libgwyfile_function_returns_null(self):
        """
        Returns empty list if libgwyfile function returns NULL
        """

        enum_ch = self.mock_lib.gwyfile_object_container_enumerate_channels
        enum_ch.return_value = ffi.NULL
        ids = GwyContainer._get_channel_ids(self.gwyfile)
        self.assertEqual(ids, [])
    def test_libgwyfile_function_returns_non_zero_channels(self):
        """
        Returns list of channel ids if their number is not zero
        """

        enum_chs = self.mock_lib.gwyfile_object_container_enumerate_channels
        enum_chs.side_effect = self._side_effect_non_zero_channels
        ids = GwyContainer._get_channel_ids(self.gwyfile)
        self.assertEqual(ids, [0, 1, 2])