Revision 72747d91 test/hs/Test/Ganeti/Objects.hs

b/test/hs/Test/Ganeti/Objects.hs
7 7

  
8 8
{-
9 9

  
10
Copyright (C) 2009, 2010, 2011, 2012 Google Inc.
10
Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc.
11 11

  
12 12
This program is free software; you can redistribute it and/or modify
13 13
it under the terms of the GNU General Public License as published by
......
272 272
case_py_compat_networks :: HUnit.Assertion
273 273
case_py_compat_networks = do
274 274
  let num_networks = 500::Int
275
  sample_networks <- sample' (vectorOf num_networks genValidNetwork)
276
  let networks = head sample_networks
277
      networks_with_properties = map getNetworkProperties networks
275
  networks <- genSample (vectorOf num_networks genValidNetwork)
276
  let networks_with_properties = map getNetworkProperties networks
278 277
      serialized = J.encode networks
279 278
  -- check for non-ASCII fields, usually due to 'arbitrary :: String'
280 279
  mapM_ (\net -> when (any (not . isAscii) (J.encode net)) .
......
322 321
case_py_compat_nodegroups :: HUnit.Assertion
323 322
case_py_compat_nodegroups = do
324 323
  let num_groups = 500::Int
325
  sample_groups <- sample' (vectorOf num_groups genNodeGroup)
326
  let groups = head sample_groups
327
      serialized = J.encode groups
324
  groups <- genSample (vectorOf num_groups genNodeGroup)
325
  let serialized = J.encode groups
328 326
  -- check for non-ASCII fields, usually due to 'arbitrary :: String'
329 327
  mapM_ (\group -> when (any (not . isAscii) (J.encode group)) .
330 328
                 HUnit.assertFailure $

Also available in: Unified diff