Fix wrong handling of utf8 that could lead to server crashes

Change-Id: I0f21d61ccfa889a98cc6602d3d3ce3163a5c32b8
diff --git a/t/server/mock.pl b/t/server/mock.pl
index 5389156..59a6766 100644
--- a/t/server/mock.pl
+++ b/t/server/mock.pl
@@ -52,7 +52,6 @@
 helper expired => sub {
   my ($c, $auth, $set) = @_;
 
-
   $auth =~ s/^[^ ]+? //;
   if ($set) {
     $c->app->log->debug("Set $auth for expiration");
@@ -402,7 +401,7 @@
     }
 
     # Check for wrong user name
-    elsif ($c->param('username') ne 'test') {
+    elsif ($c->param('username') !~ /^t.st$/) {
       return $c->render(json => {
         error => [[2004, undef]]
       });