'Test: create/edit a distro'

def _create_distro(self):

    distros = self.remote.get_distros(self.token)
    tprint('new_distro')
    distro = self.remote.new_distro(self.token)
    tprint('modify_distro')
    for field in self.distro_fields:
        (fname, fgood, fbad) = field
        for fb in fbad:
            try:
                self.remote.modify_distro(distro, fname, fb, self.token)
            except:
                pass
            else:
                self.fail(('bad    field    (%s=%s)    did    not    raise    an    exception' % (fname, fb)))
        for fg in fgood:
            try:
                result = self.remote.modify_distro(distro, fname, fg, self.token)
                self.assertTrue(result)
            except Exception as e:
                self.fail(('good    field    (%s=%s)    raised    exception:    %s' % (fname, fg, str(e))))
    tprint('save_distro')
    self.assertTrue(self.remote.save_distro(distro, self.token))
    new_distros = self.remote.get_distros(self.token)
    self.assertTrue((len(new_distros) == (len(distros) + 1)))
