Primality testing with Artin symbols