"flowcell_id": "11ONEAAXX"
}
},
- {"pk": 2, "model": "experiments.flowcell",
+ {"pk": 2, "model": "experiments.flowcell",
"fields": {
"paired_end": false,
"run_date": "2010-09-11 22:12:13",
"flowcell_id": "22TWOAAXX"
}
},
+ {"pk": 3, "model": "experiments.flowcell",
+ "fields": {
+ "paired_end": false,
+ "run_date": "2010-09-11 22:12:13",
+ "read_length": 75,
+ "notes": "",
+ "advanced_run": false,
+ "control_lane": 2,
+ "flowcell_id": "33THRAAXX (failed)"
+ }
+ },
{"pk": "10001", "model": "samples.library",
"fields": {
"ten_nM_dilution": false,
"lane_number": 8,
"pM": "8"
}
+ },
+ {"pk": 9, "model": "experiments.lane",
+ "fields": {
+ "comment": "10004 lane 4",
+ "library": "10001",
+ "cluster_estimate": 100000,
+ "flowcell": 3,
+ "lane_number": 4,
+ "pM": "8"
+ }
+ },
+ {"pk": 10, "model": "experiments.lane",
+ "fields": {
+ "comment": "10001 lane 1",
+ "library": "10001",
+ "cluster_estimate": 100000,
+ "flowcell": 3,
+ "lane_number": 1,
+ "pM": "8"
+ }
+ },
+ {"pk": 11, "model": "experiments.lane",
+ "fields": {
+ "comment": "10001 lane 1",
+ "library": "10003",
+ "cluster_estimate": 100000,
+ "flowcell": 3,
+ "lane_number": 2,
+ "pM": "8"
+ }
+ },
+ {"pk": 12, "model": "experiments.lane",
+ "fields": {
+ "comment": "10003 lane 8",
+ "library": "10003",
+ "cluster_estimate": 100000,
+ "flowcell": 3,
+ "lane_number": 8,
+ "pM": "8"
+ }
+ },
+ {"pk": 13, "model": "experiments.lane",
+ "fields": {
+ "comment": "10002 lane 8",
+ "library": "10001",
+ "cluster_estimate": 100000,
+ "flowcell": 3,
+ "lane_number": 8,
+ "pM": "8"
+ }
}
-]
\ No newline at end of file
+]
self.failUnlessEqual('http://localhost/flowcell/%s/' % (flowcell),
flowcells[0])
+ def test_add_disk_failed_flowcell(self):
+ url = '/inventory/it/Hard Drive/'
+ #url_disk = '/inventory/8a90b6ce522311de99b00015172ce556/'
+ url_disk = '/inventory/b0792d425aa411de99b00015172ce556/'
+ indexNode = localhostNode(url)
+ diskNode = localhostNode(url_disk)
+ self.client.login(username='test', password='BJOKL5kAj6aFZ6A5')
+
+ flowcells = self.get_flowcells_from_content(url, indexNode, diskNode)
+ self.failUnlessEqual(len(flowcells), 0)
+
+ # step two link the flowcell
+ flowcell = '33THRAAXX'
+ serial = 'WCAU49042470'
+ link_url = urlresolvers.reverse(
+ 'htsworkflow.frontend.inventory.views.link_flowcell_and_device',
+ args=(flowcell, serial))
+ link_response = self.client.get(link_url)
+ self.failUnlessEqual(link_response.status_code, 200)
+
+ flowcells = self.get_flowcells_from_content(url, indexNode, diskNode)
+ self.failUnlessEqual(len(flowcells), 1)
+ self.failUnlessEqual('http://localhost/flowcell/%s/' % (flowcell),
+ flowcells[0])
+
def get_flowcells_from_content(self, url, rootNode, diskNode):
model = get_model()