<commit_before>module.exports.testApiUsersGet = function(pgDropCreateMigrate, command_serve, testHelperInsertUser, testHelperGrantUserRights, testHelperGet, testHelperLogin, urlApiUsers, errorMessageForEndForbiddenTokenRequired, errorMessageForEndForbiddenInsufficientRights, shutdown) {
  return function(test) {
    return pgDropCreateMigrate().bind({}).then(function() {
      return testHelperInsertUser('operator', '<EMAIL>', 'topsecret');
    }).then(function() {
      return testHelperInsertUser('a', '<EMAIL>', 'topsecret');
    }).then(function() {
      return testHelperInsertUser('b', '<EMAIL>', 'topsecret');
    }).then(function() {
      return testHelperInsertUser('c', '<EMAIL>', 'topsecret');
    }).then(function() {
      return command_serve();
    }).then(function() {
      console.log('unauthenticated');
      return testHelperGet(null, urlApiUsers());
    }).then(function(response) {
      test.equal(response.statusCode, 403);
      test.equal(response.body, errorMessageForEndForbiddenTokenRequired);
      console.log('authenticate');
      return testHelperLogin(test, 'operator', 'topsecret');
    }).then(function(token) {
      this.token = token;
      console.log('unprivileged');
      return testHelperGet(this.token, urlApiUsers());
    }).then(function(response) {
      var querystring;
      test.equal(response.statusCode, 403);
      test.equal(response.body, errorMessageForEndForbiddenInsufficientRights);
      console.log('make privileged');
      testHelperGrantUserRights('operator', ['canReadUsers']);
      console.log('unprocessable');
      querystring = ['limit=a', 'offset=a', 'order=cash', 'asc=bla', 'where[id][gt]=ab'].join('&');
      return testHelperGet(this.token, urlApiUsers() + '?' + querystring);
    }).then(function(response) {
      test.equal(response.statusCode, 422);
      test.deepEqual(response.body, {
        query: {
          limit: 'a',
          offset: 'a',
          order: 'cash',<commit_msg>add compiled js<commit_after>module.exports.testApiUsersGet = function(pgDropCreateMigrate, command_serve, testHelperInsertUser, testHelperGrantUserRights, testHelperGet, testHelperLogin, urlApiUsers, errorMessageForEndForbiddenTokenRequired, errorMessageForEndForbiddenInsufficientRights, shutdown) {
  return function(test) {
    return pgDropCreateMigrate().bind({}).then(function() {
      return testHelperInsertUser('operator', '<EMAIL>', 'topsecret');
    }).then(function() {
      return testHelperInsertUser('a', '<EMAIL>', 'topsecret');
    }).then(function() {
      return testHelperInsertUser('b', '<EMAIL>', 'topsecret');
    }).then(function() {
      return testHelperInsertUser('c', '<EMAIL>', 'topsecret');
    }).then(function() {
      return command_serve();
    }).then(function() {
      console.log('unauthenticated');
      return testHelperGet(null, urlApiUsers());
    }).then(function(response) {
      test.equal(response.statusCode, 403);
      test.equal(response.body, errorMessageForEndForbiddenTokenRequired);
      console.log('authenticate');
      return testHelperLogin(test, 'operator', 'topsecret');
    }).then(function(token) {
      this.token = token;
      console.log('unprivileged');
      return testHelperGet(this.token, urlApiUsers());
    }).then(function(response) {
      test.equal(response.statusCode, 403);
      test.equal(response.body, errorMessageForEndForbiddenInsufficientRights);
      console.log('make privileged');
      return testHelperGrantUserRights('operator', ['canReadUsers']);
    }).then(function() {
      var querystring;
      console.log('unprocessable');
      querystring = ['limit=a', 'offset=a', 'order=cash', 'asc=bla', 'where[id][gt]=ab'].join('&');
      return testHelperGet(this.token, urlApiUsers() + '?' + querystring);
    }).then(function(response) {
      test.equal(response.statusCode, 422);
      test.deepEqual(response.body, {
        query: {
          limit: 'a',
          offset: 'a',
          order: 'cash',
{'fraction_non_alphanumeric': 0.15764411027568923, 'fraction_numerical': 0.004511278195488722, 'mean_word_length': 4.328437917222964, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2346254', 'n_tokens_mistral': 1178, 'n_tokens_neox': 1151, 'n_words': 187}