Browse Source

removed tests

pull/24/head
theycallmemac 3 years ago
parent
commit
7478bfb263
3 changed files with 0 additions and 96 deletions
  1. +0
    -2
      .travis.yml
  2. +0
    -44
      tests/available_now_integration.py
  3. +0
    -50
      tests/lookup_building_integration.py

+ 0
- 2
.travis.yml View File

@@ -8,8 +8,6 @@ install:
- pip install -r requirements.txt

script:
- python tests/available_now_integration.py
- python tests/lookup_building_integration.py
- python tests/test_lookup_output.py
- python tests/test_available_now_output.py



+ 0
- 44
tests/available_now_integration.py View File

@@ -1,44 +0,0 @@
import unittest
import sys
import datetime
import os
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from scripts import utils
from scripts import now
from test_required import required

class AvailableNowIntegrationTestCase(unittest.TestCase):
def setUp(self):
return required()

def test_lab(self):
parser, (options, arguments), rooms, info = self.setUp()
(options, args) = parser.parse_args(["-L"])
lst = utils.get_lst(rooms[0], rooms[1], options)
week, day, hour, minute = '2', '1', '14', '30'
now_obj = now.Now(week, day, hour, minute)
utils.check_args(week, day)
now_obj.check_time(info[0])

def test_room(self):
parser, (options, arguments), rooms, info = self.setUp()
(options, args) = parser.parse_args(["-C"])
lst = utils.get_lst(rooms[0], rooms[1], options)
week, day, hour, minute = '24', '2', '08', '00'
now_obj = now.Now(week, day, hour, minute)
utils.check_args(week, day)
now_obj.check_time(info[0])

def test_incorrect_input(self):
parser, (options, arguments), rooms, info = self.setUp()
(options, args) = parser.parse_args(["-L"])
lst = utils.get_lst(rooms[0], rooms[1], options)
week, day, hour, minute = '60', '7', '23', '57'
now_obj = now.Now(week, day, hour, minute)
try:
utils.check_args(week, day)
except SystemExit:
pass
if __name__ == '__main__':
unittest.main()


+ 0
- 50
tests/lookup_building_integration.py View File

@@ -1,50 +0,0 @@
import unittest
import sys
import datetime
import os
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))


from scripts import utils
from scripts import lookup
from test_required import required


class LookupBuildingIntegrationTestCase(unittest.TestCase):
def test_lab_lookups(self):
parser, (options, arguments), rooms, info = required()
(options, args) = parser.parse_args(["-L"])
lst = utils.get_lst(rooms[0], rooms[1], options)
week, day, hour = '9', '5', '1600'
look = lookup.LookUp(week, day, hour)
utils.check_args(week, day)
look.check_time(info[0])

def test_room_lookups(self):
parser, (options, arguments), rooms, info = required()
(options, args) = parser.parse_args(["-C"])
lst = utils.get_lst(rooms[0], rooms[1], options)
week, day, hour = '9', '2', '0930'
look = lookup.LookUp(week, day, hour)
utils.check_args(week, day)
look.check_time(info[0])

def test_incorrect_lookups(self):
parser, (options, arguments), rooms, info = required()
try:
assert not isinstance(rooms, basestring) and not isinstance(info, basestring)
except TypeError:
print("Type error has occured")
sys.exit(1)
(options, args) = parser.parse_args(["-L"])
lst = utils.get_lst(rooms[0], rooms[1], options)
week, day, hour = '53', '7', '1600'
look = lookup.LookUp(week, day, hour)
try:
utils.check_args(week, day)
except SystemExit:
pass

if __name__ == '__main__':
unittest.main()


Loading…
Cancel
Save