Remove retry count from kwargs before key generation; Add more tests of the task key generation