Beispiel #1
0
 def testSave(self):
     mike = Student(name='Mike Bloom',
                    password='******',
                    username='******',
                    email='*****@*****.**')
     mike.save()
     mike.class_ = '1900'
     mike.save()
     mike2 = Student.findUser('mikebloom', 'password')
     self.assertEqual(mike2.class_, '1900',
                      "Object returned has correct properties")
Beispiel #2
0
 def testAddProject(self):
     john = Student.findUser('mutantseabass', 'password')
     john.projects.append('*non bogus startup idea*')
     john.save()
Beispiel #3
0
 def testOneWhere(self):
     john = Student.findUser('mutantseabass', 'password')
     self.assertEqual(john.name, 'John Bomba',
                      "Object returned has correct properties")