Commits

Anonymous committed 179af53

and it's continue

  • Participants
  • Parent commits 22736d0

Comments (0)

Files changed (2)

      WSGIUtils
      BeautifulSoup
      coverage
+     unittest2
      ipython
      ipdb     
      pypi

tests/test_store.py

 
     def test_get_journal(self):
         self.store.store_package("CLVault", "0.5", self.metadata2)
+        assert len(self.store.get_journal("CLVault", "0.5")) == 4
+        
         journal = self.store.get_journal("CLVault", "0.5")
-        
+        assert journal[0].as_dict()['action'] == 'create'
+        assert journal[1].as_dict()['action'] == 'add Owner None'
+        assert journal[2].as_dict()['action'] == 'new release'
+        assert journal[3].as_dict()['action'] == 'add Owner None'
+
+        self.store.store_package("CLVault", "0.6", self.metadata2)
+        assert len(self.store.get_journal("CLVault", "0.6")) == 5
+
+        self.store.store_package("CLVault", "0.7", self.metadata2)
+        assert len(self.store.get_journal("CLVault", "0.7")) == 6
+    
     def test_create_user(self):        
         self.store.store_user(*user1)