Example #1
0
 def setUp(self):
     self.value = {
         "first_row_is_table_header":
         True,
         "first_col_is_header":
         True,
         "data": [
             ["Ship", "Type", "Status"],
             ["Galactica", "Battlestar", "Active"],
             ["Valkyrie", "Battlestar", "Destroyed"],
             ["Cylon Basestar", "Basestar", "Active"],
             ["Brenik", "Small Military Vessel", "Destroyed"],
         ],
     }
     self.root_page = Page.objects.get(id=2)
     table_block_page_instance = TableBlockStreamPage(title="Ships",
                                                      table=json.dumps([{
                                                          "type":
                                                          "table",
                                                          "value":
                                                          self.value
                                                      }]))
     self.table_block_page = self.root_page.add_child(
         instance=table_block_page_instance)
     self.user = self.login()
Example #2
0
 def setUp(self):
     self.value = {
         'first_row_is_table_header':
         True,
         'first_col_is_header':
         True,
         'data': [
             ['Ship', 'Type', 'Status'],
             ['Galactica', 'Battlestar', 'Active'],
             ['Valkyrie', 'Battlestar', 'Destroyed'],
             ['Cylon Basestar', 'Basestar', 'Active'],
             ['Brenik', 'Small Military Vessel', 'Destroyed'],
         ]
     }
     self.root_page = Page.objects.get(id=2)
     table_block_page_instance = TableBlockStreamPage(title='Ships',
                                                      table=json.dumps([{
                                                          'type':
                                                          'table',
                                                          'value':
                                                          self.value
                                                      }]))
     self.table_block_page = self.root_page.add_child(
         instance=table_block_page_instance)
     self.user = self.login()