'Test: create/edit a system object'

def _create_system(self):

    systems = self.remote.get_systems(self.token)
    tprint('new_system')
    system = self.remote.new_system(self.token)
    tprint('modify_system')
    self.assertTrue(self.remote.modify_system(system, 'name', 'testsystem0', self.token))
    self.assertTrue(self.remote.modify_system(system, 'profile', 'testprofile0', self.token))
    for field in self.system_fields:
        (fname, fgood, fbad) = field
        for fb in fbad:
            try:
                self.remote.modify_system(system, 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:
                self.assertTrue(self.remote.modify_system(system, fname, fg, self.token))
            except Exception as e:
                self.fail(('good    field    (%s=%s)    raised    exception:    %s' % (fname, fg, str(e))))
    tprint('save_system')
    self.assertTrue(self.remote.save_system(system, self.token))
    new_systems = self.remote.get_systems(self.token)
    self.assertTrue((len(new_systems) == (len(systems) + 1)))
