def setUpClass(cls): super(ResolvePopitNameTest, cls).setUpClass() # Create some Popolo people: cls.john_q = models.Person.objects.create( name='John Quentin Smith', ) models.Person.objects.create( name='John Smith', ) cls.pele = models.Person.objects.create( name='Pele', ) cls.mandela = models.Person.objects.create( name='Nelson Mandela', given_name='Nelson', ) org_anc = models.Organization.objects.create( name='African National Congress (ANC)', classification='Party', ) models.Membership.objects.create( organization=org_anc, person=cls.mandela, ) # And create lots of EntityName objects for looking them up. recreate_entities(verbose=False)
def setUpClass(cls): cls._in_fixtures = os.path.join( os.path.abspath(os.path.dirname(__file__)), "test_inputs", "hansard" ) super(ImportZAAkomaNtosoTests, cls).setUpClass() # Delete test index call_command("rebuild_index", interactive=False, verbosity=3) call_command("update_index", interactive=False, verbosity=3) recreate_entities()
def handle(self, *args, **options): recreate_entities()
def setUpClass(cls): cls._in_fixtures = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'test_inputs', 'committee') super(ImportJsonTests, cls).setUpClass() call_command('update_index', interactive=False, verbosity=0) recreate_entities()
def setUpClass(cls): cls._in_fixtures = os.path.join(os.path.abspath( os.path.dirname(__file__)), 'test_inputs', 'hansard') super(ImportZAAkomaNtosoTests, cls).setUpClass() call_command('update_index', interactive=False, verbosity=0) recreate_entities()