'The fullname is determined in one of the following ways:
* A name and namespace are both specified.  For example,
one might use "name": "X", "namespace": "org.foo"
to indicate the fullname "org.foo.X".
* A fullname is specified.  If the name specified contains
a dot, then it is assumed to be a fullname, and any
namespace also specified is ignored.  For example,
use "name": "org.foo.X" to indicate the
fullname "org.foo.X".
* A name only is specified, i.e., a name that contains no
dots.  In this case the namespace is taken from the most
tightly encosing schema or protocol.  For example,
if "name": "X" is specified, and this occurs
within a field of the record definition
of "org.foo.Y", then the fullname is "org.foo.X".
References to previously defined names are as in the latter
two cases above: if they contain a dot they are a fullname, if
they do not contain a dot, the namespace is the namespace of
the enclosing definition.
Primitive type names have no namespace and their names may
not be defined in any namespace.  A schema may only contain
multiple definitions of a fullname if the definitions are
equivalent.'

def test_fullname(self):

    print_test_name('TEST    FULLNAME')
    fullname = schema.Name('a', 'o.a.h', None).fullname
    self.assertEqual(fullname, 'o.a.h.a')
    fullname = schema.Name('a.b.c.d', 'o.a.h', None).fullname
    self.assertEqual(fullname, 'a.b.c.d')
    fullname = schema.Name('a', None, 'b.c.d').fullname
    self.assertEqual(fullname, 'b.c.d.a')
    fullname = schema.Name('a.b.c.d', None, 'o.a.h').fullname
    self.assertEqual(fullname, 'a.b.c.d')
    fullname = schema.Name('a.b.c.d', 'o.a.a', 'o.a.h').fullname
    self.assertEqual(fullname, 'a.b.c.d')
    fullname = schema.Name('a', 'o.a.a', 'o.a.h').fullname
    self.assertEqual(fullname, 'o.a.a.a')
