
from time import sleep
import unittest
import os
from subprocess import call
import cairis.bin.cairisd

__author__ = 'Robin Quetin'


class CairisDaemonTestCase(unittest.TestCase):
#  call([os.environ['CAIRIS_SRC'] + "/test/initdb.sh"])
  app = cairis.bin.cairisd.main(['-d', '--unit-test'])
  sleep(1)


from time import sleep
import unittest
import os
import cairis.bin.cairisd

__author__ = 'Robin Quetin'


class CairisDaemonTestCase(unittest.TestCase):
  cmd = os.environ['CAIRIS_SRC'] + "/test/initdb.sh"
  os.system(cmd)
  app = cairis.bin.cairisd.main(['-d', '--unit-test'])
  sleep(1)

Use os.system to initialise db in tests
Use os.system to initialise db in tests

  
  from time import sleep
  import unittest
  import os
- from subprocess import call
  import cairis.bin.cairisd
  
  __author__ = 'Robin Quetin'
  
  
  class CairisDaemonTestCase(unittest.TestCase):
- #  call([os.environ['CAIRIS_SRC'] + "/test/initdb.sh"])
+   cmd = os.environ['CAIRIS_SRC'] + "/test/initdb.sh"
+   os.system(cmd)
    app = cairis.bin.cairisd.main(['-d', '--unit-test'])
    sleep(1)
  
Use os.system to initialise db in tests
## Code Before:

from time import sleep
import unittest
import os
from subprocess import call
import cairis.bin.cairisd

__author__ = 'Robin Quetin'


class CairisDaemonTestCase(unittest.TestCase):
#  call([os.environ['CAIRIS_SRC'] + "/test/initdb.sh"])
  app = cairis.bin.cairisd.main(['-d', '--unit-test'])
  sleep(1)

## Instruction:
Use os.system to initialise db in tests
## Code After:

from time import sleep
import unittest
import os
import cairis.bin.cairisd

__author__ = 'Robin Quetin'


class CairisDaemonTestCase(unittest.TestCase):
  cmd = os.environ['CAIRIS_SRC'] + "/test/initdb.sh"
  os.system(cmd)
  app = cairis.bin.cairisd.main(['-d', '--unit-test'])
  sleep(1)
