'Test Group model'

def test_model_Group_basic(self):

    name = 'testgroup'
    obj = Group(name=name)
    obj.save()
    self.assertIsNone(obj.parent)
    self.assertIsNone(obj.details)
    self.assertQuerysetEqual(obj.child_set.all(), [])
    self.assertEqual(obj.get_absolute_url(), '/contacts/group/view/{}'.format(obj.id))
    self.assertEqual(obj.get_root(), obj)
    self.assertEqual(obj.get_tree_path(), [obj])
    self.assertIsNone(obj.get_contact())
    self.assertFalse(obj.has_contact())
    self.assertEqual(obj.get_fullname(), name)
    self.assertEqual(obj.get_perspective(), Perspective.objects.all()[0])
