Merge branch 'master' of csgitlab.ucd.ie:19206226/q-a_platform into ajax_post
Conflicts: data-dev.sqliteajax_post
commit
5f0e18063f
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
|
||||
kubectl apply -f web-methodology-deployment.yaml
|
||||
kubectl apply -f web-methodology-services.yaml
|
@ -0,0 +1,36 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: web-methodology-deployment
|
||||
labels:
|
||||
web: methodology
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
web: methodology
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
web: methodology
|
||||
spec:
|
||||
containers:
|
||||
- name: web-methodology
|
||||
image: echo0821/web-methodology
|
||||
ports:
|
||||
- containerPort: 5000
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: web-methodology-services
|
||||
spec:
|
||||
selector:
|
||||
web: methodology
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 80
|
||||
targetPort: 5000
|
||||
|
@ -0,0 +1,24 @@
|
||||
import unittest
|
||||
from app import models
|
||||
|
||||
|
||||
class TestModels(unittest.TestCase):
|
||||
|
||||
def testExist(self):
|
||||
self.assertIsNotNone(models.db)
|
||||
self.assertIsNotNone(models.User)
|
||||
self.assertIsNotNone(models.Role)
|
||||
self.assertIsNotNone(models.Permission)
|
||||
self.assertIsNotNone(models.Post)
|
||||
self.assertIsNotNone(models.AnonymousUser)
|
||||
self.assertIsNotNone(models.Collect)
|
||||
self.assertIsNotNone(models.Comment)
|
||||
self.assertIsNotNone(models.Follow)
|
||||
self.assertIsNotNone(models.Like)
|
||||
self.assertIsNotNone(models.Activity)
|
||||
self.assertIsNotNone(models.Notification)
|
||||
self.assertIsNotNone(models.Want)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
@ -0,0 +1,22 @@
|
||||
import unittest
|
||||
|
||||
|
||||
class TestStringMethods(unittest.TestCase):
|
||||
|
||||
def test_upper(self):
|
||||
self.assertEqual('foo'.upper(), 'FOO')
|
||||
|
||||
def test_isupper(self):
|
||||
self.assertTrue('FOO'.isupper())
|
||||
self.assertFalse('Foo'.isupper())
|
||||
|
||||
def test_split(self):
|
||||
s = 'hello world'
|
||||
self.assertEqual(s.split(), ['hello', 'world'])
|
||||
# check that s.split fails when the separator is not a string
|
||||
with self.assertRaises(TypeError):
|
||||
s.split(2)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
Loading…
Reference in New Issue