예제 #1
0
 def test_add_artist_with_artists_in(self):
     self.add_test_data()
     artist_count = artworkstore.artist_count()
     at = Artist(artist_name='aa', artist_email='jill.gmail.com')
     at.save()
     self.assertTrue(artworkstore.exact_match(at))
     self.assertEqual(artist_count + 1, artworkstore.artist_count())
예제 #2
0
 def test_add_artwork_with_artworks_in(self):
     self.add_test_data()
     artwork_count = artworkstore.artwork_count()
     aw = Artwork(artwork_name='aa')
     aw.save()
     self.assertTrue(artworkstore.exact_match(aw))
     self.assertEqual(artwork_count + 1, artworkstore.artwork_count())
예제 #3
0
 def test_add_artwork_empty_store(self):
     aw = Artwork(artwork_name='aaa')
     aw.save()
     self.assertTrue(artworkstore.exact_match(aw))
     self.assertEqual(1, artworkstore.artwork_count())
예제 #4
0
 def test_exact_match_not_found_empty_store(self):
     aw = Artwork(artwork_name='Whatever')
     self.clear_artworkstore()
     self.assertFalse(artworkstore.exact_match(aw))
예제 #5
0
 def test_add_artist_empty_store(self):
     at = Artist(artist_name='aa', artist_email='*****@*****.**')
     at.save()
     self.assertTrue(artworkstore.exact_match(at))
     self.assertEqual(1, artworkstore.artist_count())
예제 #6
0
 def test_exact_match_not_found_name(self):
     self.add_test_data()
     aw = Artwork(artwork_name='Very long Sentence')
     self.assertFalse(artworkstore.exact_match(aw))
예제 #7
0
 def test_exact_match_not_found(self):
     self.add_test_data()
     aw = Artwork(artwork_name='Long sentences')
     self.assertTrue(artworkstore.exact_match(aw))
예제 #8
0
 def test_is_artwork_in_store_empty_list(self):
     self.clear_artworkstore()
     not_in_store = Artwork(artwork_name='ccc')
     self.assertFalse(artworkstore.exact_match(not_in_store))
예제 #9
0
 def test_is_artwork_in_store_not_present(self):
     not_in_store = Artwork(artwork_name='aaaa')
     self.add_test_data()
     self.assertFalse(artworkstore.exact_match(not_in_store))
예제 #10
0
 def test_is_artwork_in_store_present(self):
     self.add_test_data()
     self.assertTrue(artworkstore.exact_match(self.aw1))
     self.assertTrue(artworkstore.exact_match(self.aw2))
     self.assertTrue(artworkstore.exact_match(self.aw2))