A York man who let his dog bite his partner as well as injuring her himself could be jailed for two years, York Magistrates' Court heard.