#!/usr/bin/env python

import gtk

builder = gtk.Builder()
builder.add_from_string(
"""
<?xml version="1.0"?>
<interface>
  <requires lib="gtk+" version="2.16"/>
  <object class="GtkFileFilter" id="my_file_filter"/>
</interface>
""")

my_file_filter = builder.get_objects()[0]

assert isinstance(my_file_filter, gtk.FileFilter)

# The following assertion does not hold using GTK 2.16.
assert my_file_filter.get_name() == "my_file_filter"
